/* RISK & COMPLIANCE: the workspace. ws-* carries the shell; rs- is the rest. */

/* The course catalogue is the real carousel node, moved into the "Get
   trained" module and moved back out afterwards. It carries `hidden` and
   .rk-panel (display:none) while it is parked, and .is-active when it is
   showing, so no rule here may force it hidden. Inside the module it fills
   the main column. */
[data-risk-training].is-active { display: block; margin: 0; }
[data-risk-training].is-active .rk-intro { margin-bottom: 16px; }
[data-risk-training].is-active .sp-block { margin-bottom: 0; }
.rs { display: flex; flex-direction: column; gap: 14px; }
.rs-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.rs-h h2 { margin: 0 0 4px; font-size: 19px; font-weight: 800; letter-spacing: -.015em; }
.rs-hint { margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--gray-light, #aeaeb2); max-width: 76ch; }
.rs-h-acts { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rs-h-acts .up-btn, .rs-h-acts .sr-act { display: inline-flex; align-items: center; gap: 6px; }
.rs-h-acts .ws-i { width: 14px; height: 14px; }
.rs-alerts { margin-bottom: 14px; }
.rs-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 12px; align-items: start; }

.rs-card {
    border: 1px solid rgba(255,255,255,.09); border-radius: 16px; padding: 16px 18px;
    background: rgba(255,255,255,.03); display: flex; flex-direction: column; gap: 10px; min-width: 0;
}
.rs-card.is-warn { border-color: rgba(230,167,0,.4); background: rgba(230,167,0,.06); }
.rs-card h3 { margin: 0; font-size: 14px; font-weight: 800; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; }
.rs-card h3 .ws-i { width: 15px; height: 15px; color: var(--red, #c41717); }
.rs-n { font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: 100px; background: rgba(255,255,255,.09); color: var(--gray-light, #aeaeb2); }
.rs-quiet { font-size: 12.5px; line-height: 1.5; color: var(--gray-light, #aeaeb2); }
.rs-ok { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #37c27a; }
.rs-ok .ws-i { width: 14px; height: 14px; }
.rs-blank { border: 1px dashed rgba(255,255,255,.18); border-radius: 18px; padding: 26px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.rs-blank h3 { margin: 0; font-size: 17px; font-weight: 800; }
.rs-blank p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--gray-light, #aeaeb2); max-width: 70ch; }
.rs-search {
    margin-left: auto; font: inherit; font-size: 12px; padding: 6px 10px; border-radius: 9px; width: 200px;
    background: rgba(255,255,255,.05); border: 1px solid var(--border, rgba(255,255,255,.12)); color: var(--white, #fff);
}
.rs-job { font-style: normal; font-family: var(--font-mono); font-size: 10.5px; padding: 1px 6px; margin-left: 6px; border-radius: 5px; background: rgba(255,255,255,.08); color: var(--gray-light, #aeaeb2); }
.rs-tag { display: inline-block; font-size: 10.5px; padding: 1px 7px; margin-right: 4px; border-radius: 100px; background: rgba(255,255,255,.08); color: var(--gray-light, #aeaeb2); }

/* pills, one vocabulary for every register */
.rs-pill { display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: 100px; white-space: nowrap; }
.rs-pill.is-ok { color: #37c27a; background: rgba(55,194,122,.14); }
.rs-pill.is-warn { color: #e6a700; background: rgba(230,167,0,.14); }
.rs-pill.is-bad { color: #ff5c5c; background: rgba(255,92,92,.14); }
.rs-pill.is-mute { color: var(--gray-light, #aeaeb2); background: rgba(255,255,255,.08); }
.rs-yes { color: #37c27a; font-weight: 700; } .rs-no { color: var(--gray-light, #aeaeb2); font-weight: 600; }

/* tables */
.rs-tablewrap { overflow-x: auto; border: 1px solid rgba(255,255,255,.08); border-radius: 12px; }
.rs-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.rs-table thead th { text-align: left; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--gray-light, #aeaeb2); padding: 9px 11px; border-bottom: 1px solid rgba(255,255,255,.08); white-space: nowrap; }
.rs-table td { padding: 9px 11px; border-bottom: 1px solid rgba(255,255,255,.05); vertical-align: middle; }
.rs-table tr:last-child td { border-bottom: 0; }
.rs-table tr.is-bad td { background: rgba(255,92,92,.06); }
.rs-table tr.is-missing td { background: rgba(255,92,92,.04); }
.rs-table tr.is-done td { opacity: .6; }
.rs-table .rs-num, .rs-table th.rs-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rs-table small { display: block; font-size: 10.5px; }
.rs-acts { text-align: right; white-space: nowrap; }
.rs-ib { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 7px; border: 1px solid transparent; background: transparent; color: var(--gray-light, #aeaeb2); cursor: pointer; font: inherit; }
.rs-ib .ws-i { width: 13px; height: 13px; }
.rs-ib:hover { border-color: rgba(255,255,255,.2); color: var(--white, #fff); }
.rs-ib.is-danger:hover { border-color: rgba(196,23,23,.5); color: #ff8f8f; }
.rs-mini { padding: 4px 10px; font-size: 11.5px; }
.rs-sel {
    font: inherit; font-size: 11.5px; padding: 4px 8px; border-radius: 8px; margin-right: 4px;
    background: rgba(255,255,255,.05); border: 1px solid var(--border, rgba(255,255,255,.12)); color: var(--white, #fff);
}
.rs-bar { display: inline-block; width: 60px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.1); overflow: hidden; vertical-align: middle; margin-right: 6px; }
.rs-bar i { display: block; height: 100%; background: var(--red, #c41717); border-radius: 3px; }

/* rows: one line, one fact, one action */
.rs-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; text-align: left; width: 100%; padding: 9px 11px; border-radius: 10px; border: 1px solid rgba(255,255,255,.07); background: rgba(255,255,255,.02); color: var(--white, #fff); font: inherit; font-size: 12.5px; cursor: pointer; }
button.rs-row:hover { border-color: rgba(196,23,23,.45); }
.rs-row.is-bad { border-color: rgba(255,92,92,.35); }
.rs-row.is-warn { border-color: rgba(230,167,0,.35); }
.rs-row-n { font-weight: 650; }
.rs-row-m { color: var(--gray-light, #aeaeb2); }
.rs-row > .rs-pill, .rs-row > .up-btn, .rs-row > .sr-act { margin-left: auto; }

/* the capacity hero */
.rs-hero { border: 1px solid rgba(196,23,23,.4); border-radius: 18px; padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; background: linear-gradient(135deg, rgba(196,23,23,.18), rgba(255,255,255,.02)); }
.rs-hero-n { display: flex; flex-direction: column; gap: 2px; }
.rs-hero-n span { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--gray-light, #aeaeb2); }
.rs-hero-n b { font-size: 34px; font-weight: 850; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.rs-hero-n em { font-style: normal; font-size: 12.5px; color: var(--gray-light, #aeaeb2); }
.rs-hero-b { height: 12px; border-radius: 6px; background: rgba(255,255,255,.1); overflow: hidden; }
.rs-hero-b i { display: block; height: 100%; border-radius: 6px; background: var(--red, #c41717); }
.rs-hero-m { display: flex; gap: 8px 20px; flex-wrap: wrap; font-size: 12px; color: var(--gray-light, #aeaeb2); }
.rs-hero-m b { color: var(--white, #fff); font-weight: 700; }

.rs-cap-b { height: 10px; border-radius: 5px; background: rgba(255,255,255,.1); overflow: hidden; }
.rs-cap-b i { display: block; height: 100%; background: var(--red, #c41717); border-radius: 5px; }
.rs-cap-l { font-size: 12.5px; color: var(--gray-light, #aeaeb2); }
.rs-cap-l b { font-size: 18px; font-weight: 850; color: var(--white, #fff); font-variant-numeric: tabular-nums; }

/* can you bond it */
.rs-calc-r { display: flex; gap: 8px; }
.rs-calc-r input { flex: 1 1 auto; min-width: 0; font: inherit; font-size: 13px; padding: 9px 12px; border-radius: 10px; background: rgba(255,255,255,.05); border: 1px solid var(--border, rgba(255,255,255,.12)); color: var(--white, #fff); }
.rs-calc-a { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; padding: 10px 12px; border-radius: 10px; }
.rs-calc-a .ws-i { width: 15px; height: 15px; }
.rs-calc-a.is-ok { color: #37c27a; background: rgba(55,194,122,.12); }
.rs-calc-a.is-bad { color: #ff8f8f; background: rgba(255,92,92,.12); }
.rs-calc-a.is-warn { color: #e6a700; background: rgba(230,167,0,.1); }

/* the expiry timeline */
.rs-tl { display: flex; flex-direction: column; gap: 5px; }
.rs-tl-r { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 10px; text-align: left; padding: 8px 10px; border-radius: 10px; border: 1px solid rgba(255,255,255,.07); background: rgba(255,255,255,.02); color: var(--white, #fff); font: inherit; font-size: 12.5px; cursor: pointer; }
.rs-tl-r:hover { border-color: rgba(196,23,23,.45); }
.rs-tl-d { font-family: var(--font-mono); font-size: 11.5px; font-weight: 800; text-align: center; padding: 2px 0; border-radius: 6px; background: rgba(255,255,255,.08); }
.rs-tl-r.is-stop .rs-tl-d { background: rgba(255,92,92,.2); color: #ff8f8f; }
.rs-tl-r.is-bad .rs-tl-d { background: rgba(230,167,0,.2); color: #e6a700; }
.rs-tl-t { display: flex; flex-direction: column; min-width: 0; }
.rs-tl-t b { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-tl-t em { font-style: normal; font-size: 11.5px; color: var(--gray-light, #aeaeb2); }
.rs-tl-w { font-size: 11.5px; color: var(--gray-light, #aeaeb2); white-space: nowrap; }

/* requirements */
.rs-req { border: 1px solid rgba(255,255,255,.07); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.rs-req-h { display: flex; align-items: center; gap: 10px; }
.rs-req-h b { font-size: 13px; font-weight: 750; }
.rs-req-h .rs-pill { margin-left: auto; }
.rs-req-r { display: grid; grid-template-columns: minmax(0, 1fr) auto 26px; align-items: center; gap: 10px; font-size: 12.5px; padding: 5px 0; border-top: 1px solid rgba(255,255,255,.05); }
.rs-req-l { font-weight: 600; }
.rs-req-c { color: var(--gray-light, #aeaeb2); white-space: nowrap; }
.rs-req-r.is-stop .rs-req-l { color: #ff8f8f; }
.rs-req-r.is-bad .rs-req-l { color: #e6a700; }

/* certificates */
.rs-cert { border: 1px solid rgba(255,255,255,.07); border-radius: 12px; padding: 11px 13px; display: flex; flex-direction: column; gap: 7px; }
.rs-cert-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rs-cert-h b { font-size: 13px; font-weight: 750; }
.rs-cert-h .rs-pill { margin-left: auto; }
.rs-steps { display: flex; gap: 4px; flex-wrap: wrap; }
.rs-step { font-size: 10.5px; padding: 2px 8px; border-radius: 100px; background: rgba(255,255,255,.06); color: var(--gray-light, #aeaeb2); }
.rs-step.is-on { background: rgba(55,194,122,.16); color: #37c27a; font-weight: 700; }
.rs-cert-f { display: flex; align-items: center; gap: 10px; font-size: 11.5px; color: var(--gray-light, #aeaeb2); }
.rs-cert-a { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.rs-warnbox { font-size: 12.5px; line-height: 1.7; padding: 10px 12px; border-radius: 10px; background: rgba(230,167,0,.08); border: 1px solid rgba(230,167,0,.3); }
.rs-chipb { font: inherit; font-size: 11.5px; padding: 3px 10px; margin: 2px 4px 2px 0; border-radius: 100px; cursor: pointer; border: 1px solid rgba(255,255,255,.16); background: rgba(255,255,255,.05); color: var(--white, #fff); }
.rs-chipb:hover { border-color: var(--red, #c41717); }

/* toolbox talks */
.rs-cov { display: flex; flex-direction: column; gap: 6px; padding: 10px 0; border-top: 1px solid rgba(255,255,255,.06); }
.rs-cov:first-of-type { border-top: 0; padding-top: 0; }
.rs-cov-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rs-cov-h b { font-size: 13px; font-weight: 750; }
.rs-cov-h .rs-pill { margin-left: auto; }
.rs-weeks { display: flex; gap: 3px; flex-wrap: wrap; }
.rs-week { width: 14px; height: 20px; border-radius: 4px; background: rgba(255,92,92,.25); }
.rs-week.is-on { background: #37c27a; }
.rs-sugg { display: flex; flex-wrap: wrap; gap: 4px; }
.rs-talk { border: 1px solid rgba(255,255,255,.07); border-radius: 12px; padding: 11px 13px; display: flex; flex-direction: column; gap: 7px; }
.rs-talk-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rs-talk-h b { font-size: 13px; font-weight: 750; }
.rs-talk-h .rs-pill { margin-left: auto; }
.rs-att { display: flex; flex-wrap: wrap; gap: 4px; }
.rs-att-p { font-size: 11px; padding: 2px 8px; border-radius: 100px; background: rgba(255,255,255,.07); color: var(--gray-light, #aeaeb2); }
.rs-att-p.is-on { background: rgba(55,194,122,.16); color: #37c27a; }
.rs-talk-f { display: flex; align-items: center; gap: 6px; }
.rs-talk-f .sr-act { margin-right: auto; }

/* ── light ─────────────────────────────────────────────────────────────── */
html.light .rs-card, html.light .rs-row, html.light .rs-req, html.light .rs-cert, html.light .rs-talk, html.light .rs-tl-r, html.light .rs-tablewrap { background: #fff; border-color: rgba(0,0,0,.09); color: #111; }
html.light .rs-card.is-warn { background: rgba(230,167,0,.05); border-color: rgba(154,106,0,.3); }
html.light .rs-hint, html.light .rs-quiet, html.light .rs-row-m, html.light .rs-req-c, html.light .rs-tl-t em, html.light .rs-tl-w,
html.light .rs-hero-m, html.light .rs-cap-l, html.light .rs-cert-f, html.light .rs-table thead th, html.light .rs-blank p,
html.light .rs-att-p, html.light .rs-step, html.light .rs-tag, html.light .rs-job, html.light .rs-n { color: #5f5f66; }
html.light .rs-card h3, html.light .rs-row-n, html.light .rs-req-h b, html.light .rs-cert-h b, html.light .rs-talk-h b,
html.light .rs-tl-t b, html.light .rs-hero-n b, html.light .rs-hero-m b, html.light .rs-cap-l b, html.light .rs-blank h3 { color: #111; }
html.light .rs-hero { background: linear-gradient(135deg, rgba(196,23,23,.1), #fff 70%); border-color: rgba(196,23,23,.3); }
html.light .rs-hero-b, html.light .rs-cap-b, html.light .rs-bar { background: rgba(0,0,0,.08); }
html.light .rs-n, html.light .rs-tag, html.light .rs-job, html.light .rs-tl-d, html.light .rs-step, html.light .rs-att-p, html.light .rs-pill.is-mute { background: rgba(0,0,0,.06); }
html.light .rs-table td { border-bottom-color: rgba(0,0,0,.06); }
html.light .rs-table thead th { border-bottom-color: rgba(0,0,0,.08); }
html.light .rs-req-r, html.light .rs-cov { border-top-color: rgba(0,0,0,.06); }
html.light .rs-pill.is-ok { color: #178a4f; background: rgba(23,138,79,.12); }
html.light .rs-pill.is-warn { color: #9a6a00; background: rgba(154,106,0,.12); }
html.light .rs-pill.is-bad { color: #c41717; background: rgba(196,23,23,.1); }
html.light .rs-yes { color: #178a4f; } html.light .rs-ok { color: #178a4f; }
html.light .rs-week { background: rgba(196,23,23,.2); } html.light .rs-week.is-on { background: #178a4f; }
html.light .rs-att-p.is-on { background: rgba(23,138,79,.14); color: #178a4f; }
html.light .rs-step.is-on { background: rgba(23,138,79,.14); color: #178a4f; }
html.light .rs-search, html.light .rs-sel, html.light .rs-calc-r input, html.light .rs-chipb { background: #fff; border-color: rgba(0,0,0,.14); color: #111; }
html.light .rs-blank { border-color: rgba(0,0,0,.18); }
html.light .rs-warnbox { background: rgba(154,106,0,.06); border-color: rgba(154,106,0,.28); }
html.light .rs-calc-a.is-ok { color: #178a4f; background: rgba(23,138,79,.1); }
html.light .rs-calc-a.is-bad { color: #c41717; background: rgba(196,23,23,.08); }
html.light .rs-calc-a.is-warn { color: #9a6a00; background: rgba(154,106,0,.1); }
html.light .rs-table tr.is-bad td { background: rgba(196,23,23,.05); }
html.light .rs-table tr.is-missing td { background: rgba(196,23,23,.035); }
html.light .rs-ib:hover { border-color: rgba(0,0,0,.2); color: #111; }

/* An attachment panel opened under a row. */
.rs-docs { padding: 10px 2px 4px; }
.rs-docs-tr td { background: rgba(255,255,255,.02); }
html.light .rs-docs-tr td { background: #fafafb; }

@media (max-width: 900px) {
    .rs-grid2 { grid-template-columns: 1fr; }
    .rs-search { width: 100%; margin: 6px 0 0; }
    .rs-card h3 { flex-wrap: wrap; }
}
