/* ============================================================
   training.css — wave697-traininglib (2026-11-14): the Training
   LIBRARY (training.js) — Micheal's approved redesign canvas:
   department-grouped page-preview cards, type tabs, "Who it's for"
   chips, the Assigned-to-you strip, and the opened document as a
   rendered branded page with its steps rail, video and sign-off.
   Portal tokens first (design-system.css :root), the canvas's
   colours as the fallbacks. Gold = the one primary action per
   screen (New from template · Copy & edit with my logo · Save).
   Targets ≥ 40px; cards ≥ 250px in an auto-fill grid; one column
   on a phone.
   ============================================================ */
#training-root { max-width: none; }
.trl { --trl-ink: var(--ds-ink, #1F1530); --trl-muted: var(--ds-muted, #5E566B); --trl-navy: #2A1838; --trl-plum: #5B3A86; --trl-gold: #C9A45C;
  --trl-line: var(--ds-line, #E6E0EA); --trl-card: var(--ds-card, #FFFFFF); --trl-tint: #EEE9F2; --trl-paper: #EFEBE6;
  display: flex; flex-direction: column; gap: 22px; color: var(--trl-ink); }
.trl h1 { margin: 0; font-size: 32px; font-weight: 800; letter-spacing: -.4px; color: var(--trl-ink); }
.trl-sr { position: absolute; left: -9999px; }
.trl-link { font-weight: 600; color: var(--trl-plum); align-self: flex-start; }
.trl-eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 1px; color: #6B5F7A; text-transform: uppercase; }
.trl-count { font-size: 12.5px; color: #6B5F7A; background: var(--trl-tint); border-radius: 99px; padding: 2px 9px; font-weight: 600; }

/* buttons */
.trl-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 9px; border: 1px solid #D6CFDF;
  background: var(--trl-card); color: var(--trl-navy); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.trl-btn:hover:not(:disabled) { border-color: var(--trl-plum); }
.trl-btn:focus-visible, .trl-tab:focus-visible, .trl-chip:focus-visible, .trl-step:focus-visible, .trl-pick:focus-visible { outline: 2px solid var(--ds-focus, #5B3A86); outline-offset: 2px; }
.trl-btn:disabled { opacity: .45; cursor: not-allowed; }
.trl-btn-lg { min-height: 44px; padding: 0 18px; font-size: 14px; border-radius: 10px; }
.trl-btn-sm { min-height: 36px; font-size: 13px; }
.trl-btn-dark { background: var(--trl-navy); border-color: var(--trl-navy); color: #fff; }
.trl-btn-gold { background: var(--trl-gold); border-color: var(--trl-gold); color: var(--trl-navy); font-weight: 700; }
.trl-btn-outline { border-color: var(--trl-plum); color: #3D2266; }
.trl-btn-ico { width: 40px; padding: 0; flex: none; }

/* header */
.trl-head, .trl-dhead { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; }
.trl-head p { margin: 6px 0 0; font-size: 15px; color: var(--trl-muted); max-width: 760px; }
.trl-head-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.trl-setup { margin: 0; font-size: 13.5px; }
.trl-notice { margin: 0; padding: 12px 16px; border-radius: 12px; background: #FFF6E5; border: 1px solid #F0D9A8; color: #6B4A0E; line-height: 1.5; }

/* Assigned to you */
.trl-progress { background: var(--trl-card); border: 1px solid var(--trl-line); border-radius: 14px; padding: 18px 22px; display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }
.trl-prog-t { display: flex; flex-direction: column; gap: 4px; flex: 1 1 240px; }
.trl-prog-n { font-size: 17px; font-weight: 700; }
.trl-bar { flex: 2 1 300px; height: 10px; background: var(--trl-tint); border-radius: 99px; overflow: hidden; }
.trl-bar span { display: block; height: 10px; background: var(--trl-plum); border-radius: 99px; min-width: 0; transition: width .3s; }
.trl-prog-done { font-weight: 600; color: var(--ds-ok-ink, #1F6B3A); }

/* tabs, chips, search */
.trl-filters { display: flex; flex-direction: column; gap: 14px; }
.trl-tabs { display: flex; flex-wrap: wrap; gap: 8px; border-bottom: 1px solid #E2DCE7; padding-bottom: 14px; }
.trl-tab { min-height: 44px; padding: 0 18px; border-radius: 99px; font: inherit; font-size: 14px; font-weight: 600; border: 1px solid #D6CFDF; background: var(--trl-card); color: var(--trl-navy); cursor: pointer; }
.trl-tab.on { background: var(--trl-navy); border-color: var(--trl-navy); color: #fff; }
.trl-tab.on .trl-count { background: rgba(255,255,255,.18); color: #fff; }
.trl-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.trl-chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.trl-chips-l { font-size: 13px; color: var(--trl-muted); font-weight: 600; }
.trl-chip { min-height: 36px; padding: 0 14px; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 600; border: 1px solid #D6CFDF; background: var(--trl-card); color: #4A4257; cursor: pointer; }
.trl-chip.on { border-color: var(--trl-plum); background: #EEE6F7; color: #3D2266; }
.trl-search { position: relative; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px; background: var(--trl-card); border: 1px solid #D6CFDF; border-radius: 10px; min-width: 280px; color: #6B5F7A; }
.trl-search input { border: none; outline: none; font: inherit; font-size: 14px; flex: 1; background: transparent; color: var(--trl-ink); min-width: 0; }
.trl-search:focus-within { border-color: var(--trl-plum); }
.trl-search-full { min-width: 0; width: 100%; box-sizing: border-box; margin: 0 0 12px; }

/* department sections + the card grid */
.trl-sec { display: flex; flex-direction: column; gap: 14px; }
.trl-sec-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.trl-sec-t { display: flex; align-items: center; gap: 10px; }
.trl-sec-t h2 { margin: 0; font-size: 20px; font-weight: 700; color: var(--trl-ink); }
.trl-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.trl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.trl-card { background: var(--trl-card); border: 1px solid var(--trl-line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; transition: box-shadow .15s, border-color .15s; }
.trl-card:hover { border-color: #CFC6DA; box-shadow: 0 6px 20px -12px rgba(42,24,56,.35); }
.trl-thumb { position: relative; height: 176px; background: var(--trl-paper); display: flex; align-items: flex-end; justify-content: center; border: 0; padding: 0; width: 100%; cursor: pointer; font: inherit; }
.trl-badge { position: absolute; top: 12px; left: 12px; font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 99px; z-index: 1; }
.trl-amber { position: absolute; top: 12px; right: 12px; font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 99px; background: #FDECC8; color: #8A5300; z-index: 1; }
.trl-page { width: 156px; height: 138px; background: #fff; border-radius: 4px 4px 0 0; box-shadow: 0 2px 8px rgba(42,24,56,.14); overflow: hidden; display: flex; flex-direction: column; text-align: left; }
.trl-band { height: 24px; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 9px; flex: none; }
.trl-band-b { font-size: 7px; font-weight: 800; letter-spacing: 1.5px; color: #fff; }
.trl-band-k { font-size: 5.5px; color: #fff; opacity: .85; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.trl-pbody { padding: 9px 10px; display: flex; flex-direction: column; gap: 5px; }
.trl-ptitle { font-size: 8.5px; font-weight: 700; line-height: 1.25; color: var(--trl-ink); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.trl-pbody i { display: block; height: 3px; background: #E7E2EC; border-radius: 2px; }
.trl-pbody i.h { background: #CDBFDD; }
.trl-pbody b { display: block; height: 5px; }
.trl-thumb.vid { background: var(--trl-navy); align-items: center; }
.trl-vthumb { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.trl-vthumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.trl-vthumb img[hidden] { display: none; }
.trl-play { position: relative; width: 52px; height: 52px; border-radius: 50%; background: var(--trl-gold); color: var(--trl-navy); display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.trl-cbody { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.trl-src { align-self: flex-start; font-size: 11px; font-weight: 700; letter-spacing: .3px; padding: 2px 8px; border-radius: 6px; }
.trl-src-own { background: #EEE6F7; color: #3D2266; }
.trl-src-bta { background: #EEF0F3; color: #4A5568; }
.trl-src-tpl { background: #F3E8D2; color: #5A4115; }
.trl-src-copy { background: #DCEFEC; color: #145C55; }
.trl-ctitle { margin: 0; font-size: 15px; font-weight: 700; line-height: 1.3; color: var(--trl-ink); overflow-wrap: anywhere; }
.trl-cmeta { margin: 0; font-size: 12.5px; color: var(--trl-muted); }
.trl-cbtns { display: flex; gap: 8px; margin-top: auto; padding-top: 4px; }
.trl-cbtns .trl-btn:not(.trl-btn-ico) { flex: 1; padding: 0 8px; }
.trl-empty { background: var(--trl-card); border: 1px dashed #CFC6DA; border-radius: 14px; padding: 44px 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.trl-empty h2 { margin: 0; font-size: 20px; }
.trl-empty p { margin: 0; max-width: 540px; color: var(--trl-muted); font-size: 14px; line-height: 1.5; }
.tr-retired { border-top: 1px solid var(--ds-hair, #eee); padding-top: 12px; }
.tr-retlist { list-style: none; margin: 8px 0 0; padding: 0; }
.tr-retlist li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--ds-hair, #eee); }

/* the opened document */
.trl-dhead-t { display: flex; flex-direction: column; gap: 10px; flex: 1 1 520px; min-width: 0; }
.trl-teaches { margin: 0; font-size: 15px; color: var(--trl-muted); max-width: 760px; line-height: 1.5; }
.trl-draftline { margin: 0; font-weight: 700; color: #8A5300; }
.trl-chiprow { display: flex; flex-wrap: wrap; gap: 8px; }
.trl-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; }
.trl-pill-dept { background: #F1EEF4; color: #3E3650; font-weight: 600; }
.trl-pill-soft { background: var(--trl-tint); color: #3D2266; font-weight: 600; }
.trl-pill-gold { background: #F3E8D2; color: #5A4115; font-weight: 600; }
.trl-pill-amber { background: #FDECC8; color: #8A5300; }
.trl-minor { margin-top: -8px; }
.trl-dgrid { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.trl-rail { flex: 1 1 280px; max-width: 320px; display: flex; flex-direction: column; gap: 16px; position: sticky; top: 12px; }
.trl-panel { background: var(--trl-card); border: 1px solid var(--trl-line); border-radius: 14px; overflow: hidden; }
.trl-pad { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.trl-panel h2 { margin: 0; font-size: 15px; font-weight: 700; color: var(--trl-ink); }
.trl-panel p { margin: 0; font-size: 13px; color: var(--trl-muted); line-height: 1.45; }
.trl-steps { padding: 10px; display: flex; flex-direction: column; max-height: 52vh; overflow-y: auto; }
.trl-steps .trl-eyebrow { padding: 8px 10px 10px; }
.trl-step { display: flex; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 9px; font-size: 13.5px; text-decoration: none; color: var(--trl-navy); font-weight: 500; min-height: 40px; box-sizing: border-box; }
.trl-step:hover { background: #F6F3F9; }
.trl-step.on { background: #EEE6F7; font-weight: 700; }
.trl-stepn { flex: none; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: var(--trl-tint); color: #3D2266; }
.trl-step.on .trl-stepn { background: var(--trl-navy); color: #fff; }
.trl-vbox { height: 150px; background: var(--trl-navy); display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 8px; }
.trl-vbox video { width: 100%; height: 100%; background: #000; }
.trl-vnote { font-size: 12px; color: #D9CFE6; }
.trl-tick { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: #3E3650; line-height: 1.4; cursor: pointer; }
.trl-tick input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--trl-plum); }
.trl-signed { font-weight: 700; color: var(--ds-ok-ink, #1F6B3A) !important; }
.trl-hist summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--trl-plum); min-height: 32px; display: flex; align-items: center; }
.trl-hist ul { margin: 6px 0 0; padding: 0 0 0 16px; font-size: 13px; color: var(--trl-muted); }
.trl-hist li { padding: 3px 0; }
.trl-pane { flex: 999 1 560px; min-width: 0; background: #E4DFD8; border-radius: 14px; padding: 32px 24px; display: flex; flex-direction: column; align-items: center; gap: 12px; box-sizing: border-box; }
.trl-pane > .tr-state, .trl-pane > .muted { align-self: stretch; }
.trl-pdfpane { width: 100%; }
.trl-pdfpane .trp-view { background: transparent; }
.trl-pane .tr-video { max-width: 960px; }
.trl-vwords { width: 100%; max-width: 760px; background: #fff; border-radius: 8px; padding: 18px 24px; box-sizing: border-box; }

/* the rendered page */
.trl-sheet { width: 100%; max-width: 760px; background: #fff; box-shadow: 0 6px 24px rgba(42,24,56,.16); border-radius: 4px; overflow: hidden; }
.trl-sheet-band { padding: 20px 40px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.trl-logo-slot { width: 120px; height: 40px; border: 1.5px dashed var(--trl-gold); border-radius: 6px; display: flex; align-items: center; justify-content: center; color: #E7D3A6; font-size: 11px; font-weight: 600; letter-spacing: .5px; flex: none; }
.trl-logo-chip { display: inline-flex; align-items: center; background: #fff; border-radius: 6px; padding: 5px 10px; min-height: 30px; max-width: 220px; }
.trl-logo-chip img { height: 32px; width: auto; max-width: 200px; object-fit: contain; }
.trl-logo-chip img[hidden], .trl-logo-word[hidden] { display: none; }
.trl-logo-word { font-weight: 800; letter-spacing: 1.5px; font-size: 13px; color: var(--trl-navy); text-transform: uppercase; }
/* wave698: a template's header carries the Rookery white lockup directly on
 * the dark band — no white chip, no "your logo" slot. */
.trl-logo-rk { display: inline-flex; align-items: center; flex: none; }
.trl-logo-rk img { height: 46px; width: auto; display: block; }
.trl-sheet-k { display: flex; flex-direction: column; align-items: flex-end; text-align: right; color: #E9E2F0; font-size: 11px; line-height: 1.6; }
.trl-sheet-k b { letter-spacing: 1.5px; color: #fff; }
.trl-sheet-rule { height: 4px; background: var(--trl-gold); }
.trl-sheet-body { padding: 36px 48px 44px; display: flex; flex-direction: column; gap: 16px; }
.trl-sheet-title { margin: 0; font-size: 26px; font-weight: 800; color: var(--trl-ink); line-height: 1.2; }
.trl-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; font-size: 12px; }
.trl-strip div { background: #F6F3F9; border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.trl-strip span { color: #6B5F7A; font-weight: 600; }
.trl-strip b { color: var(--trl-ink); }
.trl-striphint { margin: 0; font-size: 12.5px; }
.trl-words { font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif; font-size: 15.5px; line-height: 1.65; color: #2A2433; }
.trl-words p { margin: 0 0 12px; }
.trl-words h3 { margin: 22px 0 8px; font-family: inherit; font-family: Inter, system-ui, sans-serif; font-size: 17px; font-weight: 700; color: #3D2266; scroll-margin-top: 16px; }
.trl-words h4 { margin: 16px 0 6px; font-family: Inter, system-ui, sans-serif; font-size: 15px; font-weight: 700; color: var(--trl-ink); scroll-margin-top: 16px; }
.trl-words ul, .trl-words ol { margin: 0 0 12px; padding-left: 1.4em; }
.trl-words li { padding: 2px 0; }
.trl-words li.trl-sub { margin-left: 1.2em; list-style: circle; }
.trl-words .tr-check { border: 1px solid #E3DCEA; border-radius: 10px; padding: 6px 14px; font-family: Inter, system-ui, sans-serif; font-size: 14px; }
.trl-words .tr-check li { border-bottom: 1px solid #F1EDF5; }
.trl-words .tr-check li:last-child { border-bottom: 0; }
.trl-words code { font-size: .9em; background: #F3F0F6; padding: 0 4px; border-radius: 4px; }
.trl-tablewrap { overflow-x: auto; margin: 0 0 14px; }
.trl-table { border-collapse: collapse; width: 100%; font-family: Inter, system-ui, sans-serif; font-size: 13.5px; }
.trl-table th, .trl-table td { border-bottom: 1px solid #ECE6F0; padding: 8px 10px; text-align: left; vertical-align: top; }
.trl-table th { background: #F6F3F9; font-weight: 700; }
.trl-placeholder { margin: 0; padding: 18px; border: 1px dashed #D6CFDF; border-radius: 10px; font-family: Inter, system-ui, sans-serif; font-size: 14px; color: var(--trl-muted); }
.trl-sheet-foot { border-top: 1px solid #ECE6F0; padding: 14px 48px; display: flex; justify-content: space-between; font-size: 11px; color: #6B5F7A; }

/* the copy editor's steps */
.trl-logo-f label { display: flex; align-items: center; gap: 8px; min-height: 36px; }
.trl-secs { display: flex; flex-direction: column; gap: 12px; margin: 0 0 16px; }
.trl-secs-h h2 { margin: 0 0 2px; font-size: 18px; }
.trl-secs-h .muted { font-size: 13px; }
.trl-secrow { display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; align-items: start; background: var(--trl-card); border: 1px solid var(--trl-line); border-radius: 12px; padding: 12px; }
.trl-secno { width: 28px; height: 28px; border-radius: 50%; background: var(--trl-navy); color: #fff; font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; margin-top: 8px; }
.trl-secfields { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.trl-secfields input, .trl-secfields textarea { min-height: 44px; padding: 8px 10px; border: 1px solid var(--ds-line, #D6CFDF); border-radius: 8px; font: inherit; background: #fff; color: var(--trl-ink); box-sizing: border-box; width: 100%; }
.trl-secfields input { font-weight: 700; }
.trl-secfields textarea { line-height: 1.5; resize: vertical; }
.trl-secbtns { display: flex; flex-direction: column; gap: 4px; }
.trl-meta-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 14px; }

/* the dialog */
.trl-modal { position: fixed; inset: 0; background: rgba(31,21,48,.45); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 1000; }
.trl-modal-card { background: var(--ds-card, #fff); border-radius: 16px; width: min(640px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 24px 60px -20px rgba(31,21,48,.5); }
.trl-modal-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px 8px; }
.trl-modal-h h2 { margin: 0; font-size: 18px; }
.trl-modal-b { padding: 4px 20px 20px; overflow-y: auto; }
.trl-picks { display: flex; flex-direction: column; border: 1px solid var(--ds-line, #E6E0EA); border-radius: 10px; overflow: hidden; max-height: 48vh; overflow-y: auto; }
.trl-pick { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; padding: 10px 14px; border: 0; border-bottom: 1px solid #F1EDF5; background: none; font: inherit; cursor: pointer; min-height: 44px; }
.trl-pick:hover { background: #F6F3F9; }
.trl-pick-t { font-weight: 600; color: var(--ds-ink, #1F1530); }
.trl-pick-m { font-size: 12.5px; color: var(--ds-muted, #5E566B); }
.trl-blank { margin: 12px 0 0; }
.trl-people { display: flex; flex-direction: column; gap: 2px; margin: 8px 0 12px; max-height: 44vh; overflow-y: auto; }
.trl-person { display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 6px; border-radius: 8px; }
.trl-person:hover { background: #F6F3F9; }
.trl-due input { max-width: 200px; }

/* shared pieces kept from wave52 (states, editor fields, checklists, media) */
.tr-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 0 0 12px; }
.tr-head h1 { margin: 0 0 4px; color: var(--ds-navy); }
.tr-itemhead { align-items: center; }
.tr-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tr-loading, .tr-state { margin: 12px 0; }
.tr-state { padding: 14px 16px; border: 1px dashed var(--ds-line); border-radius: var(--ds-r-sm); color: var(--ds-ink); background: var(--ds-card); line-height: 1.5; }
.trl .tr-state { margin: 0; }
.tr-msg { margin: 0 0 12px; padding: 10px 14px; border-radius: var(--ds-r-sm); background: var(--ds-fill); color: var(--ds-ok-ink); }
.trl .tr-msg { margin: 0; }
.tr-msg.bad { color: var(--ds-warn-ink); }
.tr-video, .tr-image { display: block; width: 100%; max-height: 70vh; border-radius: var(--ds-r); background: #000; }
.tr-image { background: transparent; object-fit: contain; }
.tr-doc { display: block; width: 100%; height: 78vh; border: 1px solid var(--ds-line); border-radius: var(--ds-r-sm); background: var(--ds-card); }
.tr-novideo { display: flex; align-items: center; gap: 14px; padding: 16px; margin: 0 0 14px; border: 1px dashed var(--ds-line); border-radius: var(--ds-r); background: var(--ds-card); width: 100%; box-sizing: border-box; }
.tr-novideo img { width: 120px; height: 80px; object-fit: cover; border-radius: var(--ds-r-sm); }
.tr-novideo p { margin: 0; }
.tr-words ol.tr-num li { padding: 4px 0; }
.tr-fill { padding: 0 3px; border-radius: 3px; background: var(--ds-fill); color: var(--ds-muted); font-style: italic; }
.tr-example-note { color: var(--ds-muted); font-style: italic; }
.tr-check { list-style: none; margin: 0; padding: 0; }
.tr-check li { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--ds-hair); }
.tr-box { flex: none; width: 18px; height: 18px; margin-top: 3px; border: 1.5px solid #8C7FA0; border-radius: 3px; box-sizing: border-box; }
.tr-box.on { background: var(--trl-plum, #5B3A86); border-color: var(--trl-plum, #5B3A86); }
.tr-confirm { margin-right: 6px; }
.tr-edit { max-width: 860px; }
.tr-f { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; }
.tr-f > span, .tr-f legend { font-weight: 600; color: var(--ds-navy); font-size: var(--ds-fs-sm); }
.tr-f input[type="text"], .tr-f input[type="number"], .tr-f input[type="date"], .tr-f select, .tr-f textarea { min-height: 44px; padding: 8px 10px; border: 1px solid var(--ds-line); border-radius: var(--ds-r-sm);
  background: var(--ds-card); color: var(--ds-ink); font: inherit; }
.tr-f textarea { min-height: 160px; line-height: 1.5; }
.tr-narrow input { max-width: 140px; }
.tr-roles { border: 1px solid var(--ds-line); border-radius: var(--ds-r-sm); padding: 10px 14px; }
.tr-roles label { display: inline-flex; align-items: center; gap: 6px; margin: 4px 16px 4px 0; min-height: 36px; }
.tr-picrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* The Help drawer's Training door. */
.help-training .help-trlist { list-style: none; margin: 0 0 8px; padding: 0; }
.help-training .help-trlist li { border-bottom: 1px solid var(--ds-hair); }
.help-training .help-trlist button { display: flex; width: 100%; justify-content: space-between; gap: 8px; padding: 10px 0; border: 0; background: none; color: var(--ds-ink);
  font: inherit; text-align: left; cursor: pointer; }
.help-training .help-trlist button span { color: var(--ds-muted); font-size: var(--ds-fs-xs); white-space: nowrap; }

/* ---------------- wave349-trio (#19): PDF-true viewing, the PDF editor, the Rookery header ---------------- */
.trp-view { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 14px 0; background: var(--ds-fill, #f3f1f7); border-radius: var(--ds-r, 12px); }
.trp-page { position: relative; background: #fff; box-shadow: 0 1px 2px rgba(36, 21, 58, .08), 0 8px 24px -14px rgba(36, 21, 58, .35); line-height: 0; }
.trp-canvas { display: block; max-width: 100%; height: auto; }
.trp-loading { padding: 18px 4px; }
.trp-foot { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.trp-note { margin: 4px 0 0; color: var(--ds-ink, #1e1731); }
.trp-warn { color: var(--ds-warn-ink, #8a5a00); }
.trp-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 1.35rem; margin: 6px 0 14px; }
.trp-status { font-size: .9em; }

.trp-editor { display: grid; grid-template-columns: minmax(250px, 300px) 1fr; gap: 18px; align-items: start; }
.trp-panel { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; background: var(--ds-card, #fff); border: 1px solid var(--ds-line, #e2dcec); border-radius: var(--ds-r, 12px); padding: 6px 14px 12px; box-shadow: 0 1px 2px rgba(36, 21, 58, .05); }
.trp-sec { padding: 12px 0; border-bottom: 1px solid var(--ds-hair, #eeeaf4); }
.trp-sec h3 { margin: 0 0 8px; font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; color: var(--ds-navy, #24153a); }
.trp-radio { display: flex; gap: 8px; align-items: flex-start; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.trp-radio:hover { background: var(--ds-fill, #f6f3fa); }
.trp-radio input { margin-top: 3px; accent-color: var(--th-select, #5b2bb5); }
.trp-radio b { display: block; font-weight: 600; font-size: .92rem; }
.trp-radio small { display: block; color: var(--ds-muted, #5b6b7f); font-size: .8rem; line-height: 1.35; }
.trp-fields { margin: 8px 0 0 4px; padding: 10px; background: var(--ds-fill, #f8f6fb); border-radius: 10px; }
.trp-fields[hidden] { display: none; }
.trp-f { display: grid; gap: 4px; margin: 0 0 8px; font-size: .85rem; }
.trp-f > span { font-weight: 600; color: var(--ds-ink, #1e1731); }
.trp-f input[type=text], .trp-f input[type=number], .trp-f select { padding: 7px 9px; border: 1px solid var(--ds-line, #d8d2e4); border-radius: 8px; font: inherit; background: #fff; }
.trp-f input[type=range] { accent-color: var(--th-select, #5b2bb5); }
.trp-check { display: flex; gap: 8px; align-items: center; font-size: .85rem; margin: 2px 0 6px; }
.trp-check input { accent-color: var(--th-select, #5b2bb5); }
.trp-tools { display: flex; gap: 8px; flex-wrap: wrap; }
.trp-tools .btn.on { border-color: var(--th-select, #5b2bb5); box-shadow: inset 0 0 0 1px var(--th-select, #5b2bb5); color: var(--th-select, #5b2bb5); }
.trp-help { font-size: .8rem; line-height: 1.4; margin: 8px 0 0; }
.trp-selbox { margin-top: 10px; padding: 10px; border: 1px dashed var(--ds-line, #d8d2e4); border-radius: 10px; }

.trp-pages { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 16px 0; background: var(--ds-fill, #f3f1f7); border-radius: var(--ds-r, 12px); min-width: 0; }
.trp-epage { line-height: normal; }
.trp-layer { position: absolute; inset: 0; }
.trp-layer.placing { cursor: crosshair; }
.trp-layer.placing, .trp-grip, .trp-size { touch-action: none; }   /* a drag on a tablet draws/moves, it doesn't scroll */
.trp-band { position: absolute; left: 0; right: 0; display: flex; align-items: center; gap: .9em; color: #1b2b44; font-family: Helvetica, Arial, sans-serif; pointer-events: none; outline: 1px dashed rgba(91, 43, 181, .45); outline-offset: -1px; }
.trp-band.cover { background: #fff; }
.trp-band-h { top: 0; }
.trp-band-f { bottom: 0; }
.trp-band-h.rule { box-shadow: inset 0 -1px 0 #2A095E; }
.trp-band-f.rule { box-shadow: inset 0 1px 0 #2A095E; }
.trp-band .l { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.trp-band .c { flex: 0 0 auto; }
.trp-band .r { flex: 1; text-align: right; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.trp-band-f .l, .trp-band-f .r { flex: 1 1 0; }
.trp-box { position: absolute; border: 1px dashed rgba(91, 43, 181, .55); }
.trp-box.fill { background: #fff; }
.trp-box.sel { border: 1.5px solid var(--th-select, #5b2bb5); box-shadow: 0 0 0 3px rgba(91, 43, 181, .15); }
.trp-boxtext { width: 100%; height: 100%; box-sizing: border-box; overflow: hidden; color: #1b2b44; font-family: Helvetica, Arial, sans-serif; white-space: pre-wrap; outline: none; cursor: text; }
.trp-grip { position: absolute; left: -7px; top: -7px; width: 12px; height: 12px; border-radius: 50%; background: var(--th-select, #5b2bb5); cursor: move; border: 2px solid #fff; }
.trp-size { position: absolute; right: -6px; bottom: -6px; width: 11px; height: 11px; background: var(--th-select, #5b2bb5); cursor: nwse-resize; border: 2px solid #fff; border-radius: 2px; }
.trp-box:not(.sel) .trp-grip, .trp-box:not(.sel) .trp-size { opacity: 0; }
.trp-box:hover .trp-grip, .trp-box:hover .trp-size { opacity: 1; }
@media (max-width: 860px) { .trp-editor { grid-template-columns: 1fr; } .trp-panel { position: static; max-height: none; } }

/* the built-in templates' ROOKERY header (walk #19 addendum) */
.tr-rk-sheet { background: #fff; border: 1px solid var(--ds-line, #e2dcec); border-radius: var(--ds-r, 12px); padding: 0 28px 24px; box-shadow: 0 8px 24px -16px rgba(36, 21, 58, .3); }
.tr-rk-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 0 -28px 18px; padding: 16px 28px 12px; border-bottom: 3px solid #2A095E; }
.tr-rk-word { font-size: 15px; letter-spacing: .32em; font-weight: 800; color: #2A095E; }
.tr-rk-logo { height: 34px; width: auto; }
.tr-rk-sub { font-size: 10.5px; letter-spacing: .2em; font-weight: 700; color: #7a6a9c; text-transform: uppercase; }


/* phone width: tabs wrap, one column of cards, the rail above the page */
@media (max-width: 860px) {
  .trl-rail { position: static; max-width: none; flex-basis: 100%; }
  .trl-pane { padding: 16px 8px; }
  .trl-sheet-body { padding: 24px 20px 28px; }
  .trl-sheet-band { padding: 16px 20px; }
  .trl-sheet-foot { padding: 12px 20px; }
}
@media (max-width: 640px) {
  .trl h1 { font-size: 26px; }
  .trl-grid { grid-template-columns: 1fr; }
  .trl-search { min-width: 0; flex: 1 1 100%; }
  .trl-tab { min-height: 40px; padding: 0 14px; font-size: 13.5px; }
  .trl-head-btns, .trl-head-btns .trl-btn { width: 100%; }
  .trl-strip { grid-template-columns: 1fr; }
  .trl-secrow { grid-template-columns: 1fr; }
  .trl-secno { margin: 0; }
  .trl-secbtns { flex-direction: row; }
  .tr-doc { height: 70vh; }
}
