/* MSP (rule 45) on the staff and course pages: Book Publication, Courses, a course page, Portal
   management, Tools & privileges. An addition to /books/msp.css (PR 279), whose tokens and step flow
   it uses as they are; only these pages' own classes are named here. */

/* A stepped staff form: the section headings and notes give way to the step's question, and the
   Save row (with the notes after it) shows on the review screen only. */
html.msp .msp-form > :is(h2:not(.msp-q), p.meta):not(.msp-save-row) { display: none; }   /* the notes after Save stay, for the review screen */
html.msp .msp-form:not(.msp-at-review) .msp-save-row { display: none; }
html.msp .msp-form .msp-save-row { display: flex; flex-direction: column; gap: var(--msp-gap); }
html.msp .msp-form fieldset[hidden] { display: none !important; }
html.msp .pub-edit label.pub-check { flex-direction: row; }

/* The header at 200% phone font: the account button wraps onto its own line rather than past the edge. */
html.msp header.top > * { min-width: 0; max-width: 100%; }
html.msp header.top .who { margin-left: auto; }

/* Nothing below 18 px, every tap 56 px. */
html.msp :is(.pub-table, .pv, td, th, .pm-tag, .pm-count, .tools a, .pm-card, li, p) { font-size: max(var(--msp-min), 1em); }
html.msp :is(.pm-card, .tools a) { min-height: var(--msp-tap); }
html.msp .jalpa-launch { width: 64px !important; height: 64px !important; }
html.msp .jalpa-launch .deva { font-size: var(--msp-min) !important; }

/* One column (8.1): card grids stack; a table becomes one card per row, each cell named by its
   column (data-label, set by the page). */
html.msp :is(.pm-grid, .tools) { grid-template-columns: minmax(0, 1fr) !important; }
html.msp :is(.pm-card, .pm-card *, .tools a, .pm-search) { overflow-wrap: anywhere; min-width: 0; max-width: 100%; box-sizing: border-box; }
html.msp :is(.pub-table-wrap, .pv-wrap) { overflow: visible; border: 0; }
html.msp :is(.pub-table, .pv) { min-width: 0 !important; width: 100%; }
html.msp :is(.pub-table, .pv) :is(tbody, tr, td) { display: block; width: 100%; box-sizing: border-box; }
html.msp :is(.pub-table, .pv) thead { display: none; }   /* each cell carries its column's name instead */
html.msp :is(.pub-table, .pv) tr { background: var(--paper, #fff); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 0 0 var(--msp-gap); }
html.msp :is(.pub-table, .pv) td { border: 0; padding: 4px 0; text-align: left; overflow-wrap: anywhere; position: static; background: none; min-width: 0; }
html.msp :is(.pub-table, .pv) td[data-label]::before { content: attr(data-label); display: block; color: var(--muted); font-size: var(--msp-min); }
html.msp .pv td:not(.who) { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: var(--msp-tap); border-top: 1px solid var(--line); }
html.msp .pv td:not(.who)::before { display: inline; }
