/* Training (#training, training.js): the app's own tokens (app.css), so light and dark follow the theme. */
.trtabs ul { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); }
.trtabs a { display: inline-block; padding: 8px 14px; border-radius: 6px 6px 0 0; text-decoration: none; color: var(--ink); font-size: 14px; font-weight: 600; border-bottom: 3px solid transparent; }
.trtabs a:hover { background: var(--accent-soft); }
.trtabs a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }

.trsum { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; margin-bottom: 22px; }
.trstats { display: flex; flex-wrap: wrap; gap: 14px 30px; align-items: flex-end; margin-top: 8px; }
.trstat b { display: block; font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.trstat span { font-size: 12.5px; color: var(--muted); }
.trstat.bad b { color: var(--warn); }
.trareas { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; }
.trarea { font-size: 12.5px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); background: var(--bg); }
.trarea.ok { border-color: var(--ok); background: var(--ok-soft); }
.trjson { flex-basis: 100%; margin: 0; }

.trsec { margin-top: 26px; }
.trsec > h2 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.trsec > .muted, .trsec > p { max-width: 780px; }
.trsec .seg { margin: 6px 0 12px; }
.trsub { font-size: 16px; margin: 22px 0 8px; }
.trlist { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 12px; }
.trcard { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 10px; padding: 14px 16px; min-width: 0; overflow-wrap: anywhere; }
.trcard.late { border-left-color: var(--warn); }
.trcard.off { border-left-color: var(--line); }
.trcard p { margin: 6px 0; }
.trcard h5 { margin: 10px 0 2px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
/* Scoped to the training cards: Team & clusters (app.css) has a .trhead of its own, a grid. */
.trcard > .trhead { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.trcard > .trhead h3, .trcard > .trhead h4 { font-size: 16px; margin: 0; }
.trcard > .trhead p { margin: 2px 0 0; }
.trq { font-size: 13.5px; }
.trpre { white-space: pre-wrap; }

.trchip { flex: none; font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); white-space: nowrap; }
.trchip.tr-overdue { border-color: var(--warn); background: var(--warn-soft); color: var(--warn); }
.trchip.tr-due { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.trchip.tr-completed_on_time { border-color: var(--ok); background: var(--ok-soft); color: var(--ink); }
.trchip.tr-completed_late { border-color: var(--support); background: var(--support-soft); color: var(--ink); }
.trchip.tr-cancelled { color: var(--muted); }
.trok { color: var(--ink); font-weight: 600; }
.trok::before { content: "✓ "; color: var(--ok); }
.trbad { color: var(--warn); font-weight: 600; }

.trtable { overflow-x: auto; position: relative; } /* the visually hidden caption stays inside */
.trtable table.ppl { min-width: 640px; }
.trtable td small { display: inline-block; }

.trform { margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); display: grid; gap: 10px; max-width: 820px; }
.trform h3, .trform h4 { font-size: 15px; margin: 0; }
.trform p { margin: 0; }
.trgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px 14px; }
.trform label > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.trform label small { font-weight: 400; color: var(--muted); }
.trform input[type="text"], .trform input[type="url"], .trform input[type="number"], .trform input[type="date"], .trform select, .trform textarea {
  width: 100%; font: inherit; font-size: 14px; padding: 7px 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); }
.trform input[type="file"] { max-width: 100%; font-size: 13px; color: var(--ink); }
.trwide { display: block; }
.trcheck { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; }
.trattest { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.trattest input { margin-top: 4px; }
.trqf { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px 10px; margin: 0; background: var(--surface); }
.trqf legend { font-weight: 600; padding: 0 4px; }
.trchoice { display: flex; gap: 8px; align-items: flex-start; padding: 3px 0; font-size: 14px; }
.trchoice input { margin-top: 4px; }
.trfile { display: block; margin-top: 6px; }
.trfile > span { font-size: 12.5px; color: var(--muted); display: block; }
.trform .err:empty { display: none; }
@media (max-width: 560px) {
  .trcard > .trhead { flex-direction: column; }
  .trtabs a { padding: 8px 10px; }
}
