/* Sovereign, batch 4: people, access and training.

   The screens of Review who has access (sva-), Staff security records
   (spl-), Security awareness training (str-) and Connect your systems
   (scn-). The files these send out
   to people (acknowledgement packs, training files, managers' access
   files) carry their own styles, in sovereign-ack-pack.js, because they
   are opened on their own, away from the site.

   Linked once, from sovereign-suite.html, after sovereign-app.css and
   before pro.css; the Console does not load it. Every rule here names a
   class of this batch's own services, which each carry a prefix of their
   own, or an id on one of their screens; the shell's classes (sv-, svs-,
   svt-), and anything services of two batches both wear, are in
   sovereign-app.css. How the batches divide the Suite: the head of
   pro-code/sovereign-services.js. */

/* --------------------------------------------------- Review who has access */

/* The screen shows and hides whole rows of buttons and steps, whose own
   display rules would otherwise win over [hidden]. */
.sva [hidden] { display: none; }
/* On a phone the steps are one plain column, whose automatic minimum
   would let a preview table widen the whole screen. */
.sva .svs-body { min-width: 0; }
.sva-choice { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.sva-inline { font-family: var(--font-sans); font-size: var(--text-xs); cursor: pointer; }
.sva-map { margin-top: 14px; padding: 16px 18px; }
.sva-map-h { margin: 0 0 4px; font-size: var(--text-sm); font-weight: 650; overflow-wrap: anywhere; }
.sva-map-h code { font-family: var(--font-mono); font-size: var(--text-xs); font-weight: 500; }
.sva-sys { max-width: 452px; margin-bottom: 12px; }
.sva-fields { margin-bottom: 12px; }
/* A preview table is as wide as its columns; it scrolls inside the card. */
.sva-scroll { overflow-x: auto; max-width: 100%; }
.sva-scroll .sfd-table td { white-space: nowrap; }
.sva-sysname { min-width: 0; display: flex; flex-direction: column; }
.sva-sysname b { font-size: var(--text-xs); }
.sva-sysname small { font-size: var(--text-2xs); color: var(--ink-faint); overflow-wrap: anywhere; }
.sva-sub { margin: 16px 0 0; font-size: var(--text-xs); font-weight: 650; }
.sva-since { margin: 12px 0 0; }
.sva-pick { display: flex; flex-wrap: wrap; gap: 10px; }
.sva-pick .svs-field { flex: 1 1 140px; min-width: 0; }
.sva-list { list-style: none; margin: 0; padding: 0; }
.sva-acct { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 250px); gap: 10px 20px; padding: 14px 0; border-bottom: 1px solid var(--sv-line); }
.sva-who { min-width: 0; }
.sva-who code { font-family: var(--font-mono); font-size: var(--text-xs); overflow-wrap: anywhere; }
.sva-who b { font-size: var(--text-xs); }
.sva-who small { display: block; margin-top: 3px; font-size: var(--text-2xs); line-height: var(--leading-ui); color: var(--ink-faint); overflow-wrap: anywhere; }
.sva-who .sci-issues { margin: 8px 0 0; }
.sva-linkrow { display: flex; gap: 8px; align-items: center; margin-top: 8px; max-width: 420px; }
.sva-linkrow .svs-field { flex: 1; min-width: 0; }
.sva-decide { display: flex; flex-direction: column; gap: 8px; }
.sva-decide .soc-chip input:disabled + span { opacity: .6; cursor: default; }
.sva-none { padding: 14px 0; font-size: var(--text-xs); color: var(--ink-faint); }
.sva-links { margin: 0 0 10px; }
.sva-tabs { margin: 4px 0 18px; }
.sva-tabs button { min-width: 0; }
.sva-n { margin-left: 6px; font-weight: 500; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
/* Where each export comes from: a name, a line of how, and a command. */
.sva-recipes { margin-top: 12px; font-size: var(--text-xs); }
.sva-recipes > summary { cursor: pointer; font-weight: 600; color: var(--ink-soft); }
.sva-recipes > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sva-recipe-list { display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); gap: 8px 16px; margin: 10px 0 0; }
.sva-recipe-list dt { font-weight: 600; }
.sva-recipe-list dd { margin: 0; color: var(--ink-soft); line-height: var(--leading-ui); min-width: 0; }
.sva-recipe-list code { display: block; margin-top: 4px; padding: 6px 8px; border-radius: var(--radius-sm); background: var(--paper-raised); border: 1px solid var(--sv-line); font-family: var(--font-mono); font-size: var(--text-2xs); overflow-wrap: anywhere; color: var(--ink); }
.sva-matrix td { padding-top: 4px; padding-bottom: 4px; }
/* The roles stay in view while the systems scroll past them. */
.sva-matrix th:first-child { position: sticky; left: 0; z-index: 1; background: var(--paper-raised); }
.sva-matrix tbody th { font-size: var(--text-xs); font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink); }
.sva-matrix .svs-input { min-width: 104px; min-height: 32px; padding-top: 4px; padding-bottom: 4px; font-size: var(--text-xs); }
.sva-by { font-size: var(--text-2xs); color: var(--ink-faint); }
.sva-managers .svs-mn { margin-bottom: 4px; }
.sva-packs { margin-top: 10px; }
.sva-mgr-none { margin-bottom: 12px; }
.sva-sshname { display: block; }
.sva-sshname .svs-input { padding-top: 2px; padding-bottom: 2px; font-weight: 600; }
.sva-key .sci-title code { font-size: var(--text-2xs); }
@media (max-width: 640px) {
  .sva-recipe-list { grid-template-columns: 1fr; gap: 2px; }
  .sva-recipe-list dt { margin-top: 8px; }
  .sva-acct { grid-template-columns: 1fr; }
  .sva-linkrow .sv-btn { min-height: 44px; }
}

/* -------------------------------------------------- Staff security records

   Scoped spl- ("people"): svp- already belongs to the privacy check. Rows
   reuse the certificate inventory's (sci-), bodies the SOC 2 tracker's
   (soc-body) and ticks the incident playbooks' (srp-); what is here is
   only what those do not cover. */

.spl-top:not(:empty) { margin-bottom: 22px; }
.spl-top .svv-warn { margin: 0; flex-wrap: wrap; align-items: center; }
.spl-grow { flex: 1; min-width: 200px; }
.spl-flags { margin: 14px 0 10px; }
.spl-flag { padding: 0; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.spl-flag:hover { text-decoration: underline; }
.spl-flag:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.spl-tabs button { min-width: 0; }
.spl-n { margin-left: 6px; font-weight: 500; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.spl-first { margin-top: 0; }
.spl-bar, .spl-empty { margin-top: 16px; }
.spl-find { flex: 1; min-width: 180px; max-width: 280px; }
.spl-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.spl-box { margin: 16px 0 0; padding: 16px 18px; border: 1px solid var(--sv-line); border-radius: var(--radius-lg); background: var(--paper-raised); }
.spl-box[hidden] { display: none; }
.spl-box h3 { margin: 0 0 12px; font-size: var(--text-md); font-weight: 650; }
.spl-box .svs-hint-top { margin-top: -6px; }
.spl-body { padding: 0 0 18px 90px; }
.spl-body h4 { margin: 18px 0 6px; }
.spl-body .sci-issues { margin-bottom: 14px; }
/* A policy or course against one person: what, where they stand, the
   date, and a button for today. */
.spl-line { display: grid; grid-template-columns: minmax(0, 1fr) auto 150px auto; align-items: center; gap: 6px 10px; padding: 7px 0; border-top: 1px solid var(--sv-line); }
.spl-what { min-width: 0; }
.spl-what b { display: block; font-size: var(--text-xs); font-weight: 600; overflow-wrap: anywhere; }
.spl-what small { display: block; font-size: var(--text-2xs); color: var(--ink-faint); }
.spl-tag-warn { background: var(--warn-soft); color: var(--ink); }
.spl-steps { list-style: none; margin: 0; padding: 0; }
.spl-steps li { display: grid; grid-template-columns: 24px minmax(0, 1fr) 150px 150px; align-items: center; gap: 6px 10px; padding: 7px 0; border-top: 1px solid var(--sv-line); }
.spl-step { font-size: var(--text-xs); line-height: var(--leading-ui); }
.spl-steps .srp-done .spl-step { color: var(--ink-soft); }
.spl-inline { margin: 0; align-self: center; }
.spl-record { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 10px; margin-top: 12px; }
.spl-record .svs-field { width: 170px; }
.spl-check { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--accent); }
/* Tables scroll in their own box, never the page. Zero width, at least
   all of it: the box then adds nothing to the column's own width when the
   layout is one column and the grid would otherwise widen to the table. */
.spl-scroll { overflow-x: auto; width: 0; min-width: 100%; margin-top: 4px; }
.spl-scroll .sfd-table th, .spl-scroll .sfd-table td { white-space: nowrap; }
.spl-scroll:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.spl-matrix th small { display: block; font-weight: 500; letter-spacing: 0; text-transform: none; }
.spl-matrix tbody th { font-size: var(--text-xs); font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--ink); }
.spl-yes { color: var(--good) !important; }
.spl-no { color: var(--warn) !important; font-weight: 600; }
.spl-open .spl-what { flex: 1; }
.spl-tpl { list-style: none; margin: 0 0 10px; padding: 0; }
.spl-tpl li { display: flex; align-items: center; gap: 6px; padding: 3px 0; }
.spl-tpl .svs-field { flex: 1; min-width: 0; }
.spl-tpl .sv-iconbtn svg { width: 13px; height: 13px; }
.spl-csv { align-items: center; }
.spl-csv .svs-label { flex-basis: 100%; margin: 0; }
@media (max-width: 640px) {
  .spl-n { display: none; }
  .spl-tabs button { padding: 0 6px; }
  .spl-find { max-width: none; }
  .spl-flag { min-height: 44px; }
  .spl-people .sci-date { grid-column: 2; }
  .spl-body { padding-left: 0; }
  .spl-line { grid-template-columns: minmax(0, 1fr) auto; }
  .spl-line [data-tag] { justify-self: end; align-self: start; text-align: right; }
  .spl-line .svs-tag { white-space: normal; }
  .spl-steps li { grid-template-columns: 44px minmax(0, 1fr) minmax(0, 1fr); }
  .spl-steps .spl-step { grid-column: 2 / -1; }
  .spl-steps .spl-date { grid-column: 2; }
  .spl-steps .spl-by { grid-column: 3; }
  .spl-steps .srp-tick { width: 44px; height: 44px; grid-row: 1 / span 2; }
  .spl-steps .srp-box { inset: 10px; }
  .spl-record .svs-field { width: 100%; }
  .spl-check { width: 24px; height: 24px; }
}

/* A leaver's accounts, from the access review, ticked off as each closes. */
.spl-leaver { margin-top: 14px; }
.spl-h5 { margin: 0 0 6px; font-size: var(--text-xs); font-weight: 650; }
.spl-sys { list-style: none; margin: 0 0 8px; padding: 0; }
.spl-sys li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 6px 0; border-top: 1px solid var(--sv-line); }
.spl-systick { display: flex; align-items: flex-start; gap: 8px; font-size: var(--text-xs); line-height: var(--leading-ui); cursor: pointer; }
.spl-systick input { width: 16px; height: 16px; margin: 1px 0 0; flex: none; accent-color: var(--accent); }
.spl-systick code { font-family: var(--font-mono); font-size: var(--text-2xs); overflow-wrap: anywhere; }

/* --------------------------------------------- Security awareness training */

.str [hidden] { display: none; }
.str .svs-main { min-width: 0; }
.str-tabs { margin-top: 4px; }
.str-tabs button { min-width: 0; }
.str-n { margin-left: 6px; font-weight: 500; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.str-phish { margin: 0 0 16px; align-items: flex-start; }
.str-mods { list-style: none; margin: 0; padding: 0; }
.str-mod { padding: 14px 0; border-top: 1px solid var(--sv-line); }
.str-pick { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; }
.str-pick input { flex: none; width: 16px; height: 16px; margin: 3px 0 0; accent-color: var(--accent); }
.str-pick b { display: block; font-size: var(--text-sm); }
.str-pick small { display: block; font-size: var(--text-2xs); color: var(--ink-faint); line-height: var(--leading-ui); margin-top: 2px; }
.str-preview { margin: 8px 0 0 26px; }
.str-preview > summary { cursor: pointer; font-size: var(--text-xs); font-weight: 600; color: var(--accent); }
.str-preview > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.str-mod .svs-actions { margin: 8px 0 0 26px; }
/* A module as staff will read it. */
.str-paper { margin-top: 10px; padding: 16px 18px; border: 1px solid var(--sv-line); border-radius: var(--radius-md); background: var(--paper-raised); font-size: var(--text-sm); line-height: var(--leading-prose); max-width: 72ch; }
.str-paper h2 { margin: 0 0 8px; font-size: var(--text-lg); }
.str-paper h3, .str-paper h4 { margin: 16px 0 6px; font-size: var(--text-sm); }
.str-paper p { margin: 0 0 10px; }
.str-paper ul, .str-paper ol { margin: 0 0 10px; padding-left: 20px; }
.str-paper blockquote { margin: 0 0 10px; padding-left: 12px; border-left: 3px solid var(--sv-line); color: var(--ink-soft); }
.str-qs > li { margin-bottom: 14px; }
.str-qs ul { list-style: none; padding-left: 0; }
.str-right { font-weight: 600; }
.str-mail { margin: 6px 0 10px; border: 1px solid var(--sv-line); border-radius: var(--radius-md); background: var(--paper); font-size: var(--text-xs); }
.str-mail dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 2px 12px; margin: 0; padding: 8px 12px; border-bottom: 1px solid var(--sv-line); }
.str-mail dt { color: var(--ink-faint); }
.str-mail dd { margin: 0; overflow-wrap: anywhere; }
.str-mail .body { padding: 8px 12px; }
.str-mail .body p { margin: 0 0 6px; }
.str-mail .lnk { color: var(--accent); text-decoration: underline; }
.str-mail .status { padding: 4px 12px; border-top: 1px solid var(--sv-line); font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--ink-faint); }
.str-own .svs-file { flex: 1; min-width: 0; }
.str-ownname { min-width: 0; display: flex; flex-direction: column; }
.str-ownname b { font-size: var(--text-xs); }
.str-ownname small { font-size: var(--text-2xs); color: var(--ink-faint); }
.str-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.str-text { min-height: 360px; font-size: var(--text-xs); line-height: var(--leading-ui); resize: vertical; }
.str-live .str-paper { margin-top: 4px; max-height: 420px; overflow: auto; }
.str-editor .sci-issues:not(:empty) { margin: 12px 0 0; }
/* Approve waits until the draft reads as a module and differs from the
   last version; it looks as unavailable as it is. */
.str-editor .sv-btn:disabled, .str .sv-btn:disabled { opacity: .5; cursor: not-allowed; }
.str-vers small { overflow-wrap: anywhere; font-family: var(--font-mono); }
.str-fields { margin-bottom: 8px; }
.str-table td small { color: var(--ink-faint); }
@media (max-width: 760px) {
  .str-split { grid-template-columns: 1fr; }
  .str-text { min-height: 240px; }
}
@media (max-width: 640px) {
  .str-n { display: none; }
  .str-tabs button { padding: 0 6px; }
  .str-preview, .str-mod .svs-actions { margin-left: 0; }
}

/* ---------------------------------------------------- Connect your systems */

/* The connectors (scn-): one card a provider, its steps, its fields, and
   what the last read found. */
.scn [hidden] { display: none; }
.scn .svs-body { min-width: 0; }
.scn-card h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.scn-state { font-family: var(--font-sans); letter-spacing: 0; text-transform: none; }
.scn-state.scn-on { background: var(--good-soft, var(--paper-inset)); color: var(--ink); }
.scn-how { margin: 0 0 14px; }
.scn-steps { margin: 10px 0 0; padding-left: 20px; line-height: var(--leading-ui); color: var(--ink-soft); }
.scn-steps li { margin: 0 0 6px; }
.scn-steps code { font-family: var(--font-mono); font-size: var(--text-2xs); overflow-wrap: anywhere; color: var(--ink); }
.scn-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.scn-pass { max-width: 452px; margin-top: 10px; }
.scn-result { margin-top: 14px; }
.scn-facts { display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); gap: 4px 16px; margin: 0; font-size: var(--text-xs); }
.scn-facts dt { color: var(--ink-faint); }
.scn-facts dd { margin: 0; overflow-wrap: anywhere; }
.scn-subjects { margin: 0 0 12px 90px; max-height: 260px; overflow: auto; }
.scn-subjects li { overflow-wrap: anywhere; }
.scn-passed { list-style: none; margin: 12px 0 0; padding: 0; font-size: var(--text-xs); color: var(--ink-soft); }
.scn-passed li { display: flex; gap: 8px; align-items: flex-start; padding: 3px 0; }
.scn-passed svg { flex: none; width: 14px; height: 14px; margin-top: 2px; color: var(--good); }
.scn-controls { margin-top: 12px; font-size: var(--text-xs); }
.scn-controls > summary { cursor: pointer; font-weight: 600; color: var(--ink-soft); }
.scn-controls > summary:focus-visible, .scn-owner > summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.scn-limits { margin: 0; padding-left: 18px; font-size: var(--text-2xs); line-height: 1.5; color: var(--ink-soft); }
.scn-limits li { margin: 0 0 6px; }
.scn-owner > summary { cursor: pointer; list-style: none; }
.scn-owner > summary::-webkit-details-marker { display: none; }
.scn-owner > summary h3 { display: inline; margin: 0; }
.scn-owner p { margin: 10px 0 0; }
.scn-empty { border-top: 0; }
@media (max-width: 640px) {
  .scn-fields { grid-template-columns: 1fr; }
  .scn-subjects { margin-left: 0; }
  .scn-facts { grid-template-columns: 1fr; gap: 0; }
  .scn-facts dd { margin-bottom: 6px; }
}

/* Connect your systems: what changed since the last read of a place. */
.scn-again { align-items: flex-end; }
.scn-every { margin: 0; min-width: 190px; }
.scn-drift { margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--sv-line); border-radius: var(--radius-md); background: var(--paper); }
.scn-drift h3 { margin: 0; font-size: var(--text-xs); font-weight: 600; color: var(--ink); }
.scn-drift-list { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; font-size: var(--text-xs); color: var(--ink-soft); }
.scn-drift-list li { overflow-wrap: anywhere; }
.scn-d { display: inline-block; min-width: 64px; font-size: var(--text-2xs); font-weight: 650; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-faint); }
.scn-d-new { color: var(--danger); }
.scn-d-gone { color: var(--good); }
