html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 0px;
}

.drag-and-drop-area {
    border-radius: 5px;
    text-align: center;
    width: 100%;
    height: 15em;
}

.drag-and-drop-area-dragging {
    background: #0dcaf0 !important;
}

/* Deploy table: content preview fixed at three lines (no expansion on hover) with a thumbnail */
.lc-3 {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    margin: 0;
}

.deploy-content {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.deploy-content .lc-3 {
    flex: 1 1 auto;
    min-width: 0;
}

.deploy-thumb {
    flex: 0 0 auto;
    height: 64px;
    max-width: 96px;
    object-fit: cover;
    border-radius: 3px;
}

/* Deploy table: in-place editing (only while the Edit toggle is on) */
/* in-cell editing parked 2026-09-16:
.editing-enabled td.editable:hover {
    cursor: cell;
    outline: 1px dashed #999;
    outline-offset: -1px;
}
*/

td.editing input,
td.editing select {
    width: 100%;
    min-width: 6rem;
}

td.editing .spinner-border-sm {
    vertical-align: middle;
}

/* Deploy table: the actions column (edit / copy / delete, or edit + accept / reject in review mode);
   the column itself is hidden by DataTables unless editing or reviewing */
.row-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.somu-table td.actions-cell {
    width: 1%;
    padding-left: .4rem;
    padding-right: .4rem;
}

/* review of generated content: undecided pale yellow, rejected pale red, accepted pale green (distinct from
   the stronger green of posted rows); a finished review leaves the rows white like a plain spreadsheet */
tr.row-draft > td    { background-color: rgba(255, 253, 1, 0.2) !important; }
tr.row-rejected > td { background-color: rgba(255, 0, 0, 0.10) !important; }
/* a row that breaks a platform rule (Session → Platform rules): not selectable, a red edge and a marker in the text cell */
tr.row-rule-problem > td:first-child { box-shadow: inset 4px 0 0 var(--bs-danger); }
tr.row-accepted > td { background-color: rgba(0, 255, 0, 0.10) !important; }

.review-locked {
    opacity: .55;
    pointer-events: none;
}

.somu-table-controls .controls-middle {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.somu-table-controls .controls-middle .vr {
    height: 24px;
}

/* channel picker (channel-picker.js): a small list under the caret or field */
.channel-picker {
    position: fixed;
    z-index: 1080;
    max-width: 420px;
    font-size: .875rem;
    max-height: 18rem;
    overflow-y: auto;
}

.channel-picker .platform-icon {
    width: 16px;
    height: 16px;
    margin-right: .4rem;
}

/* Content dialog: images on the row */
.edit-image-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    min-height: 2rem;
    align-items: center;
}

.edit-image-strip.busy {
    opacity: 0.5;
    pointer-events: none;
}

.edit-image-strip .edit-image {
    position: relative;
    margin: 0;
}

.edit-image-strip img {
    height: 72px;
    max-width: 120px;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid #ccc;
}

.edit-image-strip .remove-row-image {
    position: absolute;
    top: -6px;
    right: -6px;
    padding: 0 0.3rem;
    line-height: 1.2;
    font-size: 0.7rem;
    border-radius: 999px;
}


/* notification */
#toast-container > div {
    opacity: 0.95
}

/* datatables */
table.dataTable tbody td.dataTables_empty {
    font-size: 2em;
    line-height: 4em;
}

div.dataTables_wrapper div.dataTables_filter input {
    font-size: 1.25em;
    min-width: 300px;
}

.dataTables_length {
    font-size: 1.25em;
}

table.dataTable tbody > tr.selected,
table.dataTable tbody > tr > .selected {
    background-color: #bdd4ff;
}

.color-scheme-dark table.dataTable tbody > tr.selected,
.color-scheme-dark table.dataTable tbody > tr > .selected {
    background-color: #354153;
}

table.dataTable td.select-checkbox,
table.dataTable th.select-checkbox {
    position: relative;
}

    table.dataTable td.select-checkbox:before, 
    table.dataTable td.select-checkbox:after,
    table.dataTable th.select-checkbox:before,
    table.dataTable th.select-checkbox:after {
        display: block;
        position: absolute;
        top: 1.2em;
        left: 50%;
        width: 12px;
        height: 12px;
        box-sizing: border-box;
    }

    table.dataTable td.select-checkbox:before,
    table.dataTable th.select-checkbox:before {
        content: " ";
        margin-top: -2px;
        margin-left: -6px;
        border: 1px solid;
        border-radius: 1px;
    }

table.dataTable tr.selected td.select-checkbox:after,
table.dataTable tr.selected th.select-checkbox:after {
    content: "✓";
    font-size: 20px;
    margin-top: -19px;
    margin-left: -6px;
    text-align: center;
    text-shadow: 1px 1px #B0BED9, -1px -1px #B0BED9, 1px -1px #B0BED9, -1px 1px #B0BED9;
}

table.dataTable.compact td.select-checkbox:before,
table.dataTable.compact th.select-checkbox:before {
    margin-top: -12px;
}

table.dataTable.compact tr.selected td.select-checkbox:after,
table.dataTable.compact tr.selected th.select-checkbox:after {
    margin-top: -16px;
}

div.dataTables_wrapper span.select-info,
div.dataTables_wrapper span.select-item {
    margin-left: 0.5em;
}

@media screen and (max-width: 640px) {
    div.dataTables_wrapper span.select-info,
    div.dataTables_wrapper span.select-item {
        margin-left: 0;
        display: block;
    }
}

/*

table.dataTable tbody tr.selected,
table.dataTable tbody td.selected {
    color: white;
}

    table.dataTable tbody tr.selected a,
    table.dataTable tbody th.selected a,
    table.dataTable tbody td.selected a {
        color: #a2d4ed;
    }*/
/* ------------------------------------------------------------------ */
/* Site chrome (design Sept 2026): navbar, action bar, page, footer      */
/* Non-stock values: navbar #2f5ba6, action bar #f8f9fa + border,       */
/* .vr dividers between action groups, highlighted row #fff3cd.         */
/* ------------------------------------------------------------------ */
.somu-header {
    position: sticky;          /* the navbar stays visible while scrolling (user decision) */
    top: 0;
    z-index: 1030;
}

/* tab row: brand, one tab per page, session/user + Help/Logout on the right. The active tab is a light
   plate with a slanted left edge (the only element carrying a clip-path) that runs into the action bar
   below; inactive tabs share its left padding so labels stay put when the active state moves. */
:root {
    --somu-header-height: 49px;    /* 9px top padding + 40px active tab; site.js corrects it if the row wraps */
}

.somu-tabbar {
    background: #2f5ba6;
    padding: 9px 1rem 0;
}

.somu-tabbar-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 2px;
}

.somu-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: .1px;
    text-decoration: none;
    padding: 0 20px .35rem 0;
    line-height: 16px;
}

.somu-brand-icon {
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
}

/* two lines: "Somulator" over "ExCon" */
.somu-brand-text {
    display: flex;
    flex-direction: column;
}

.somu-brand-text span:last-child {
    font-weight: 500;
    opacity: .85;
}

.somu-brand:hover,
.somu-brand:focus {
    color: #fff;
}

.somu-tab {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 18px 0 26px;
    color: rgba(255, 255, 255, .72);
    font-size: 15px;
    text-decoration: none;
    white-space: nowrap;
}

.somu-tab:hover,
.somu-tab:focus {
    color: #fff;
}

.somu-tab.active {
    height: 40px;
    padding: 0 20px 0 30px;
    color: #1a2b45;
    font-weight: 600;
    background: #f8f9fa;
    clip-path: polygon(0 100%, 14px 6px, 16px 2.4px, 20px 0,
                       calc(100% - 10px) 0, calc(100% - 5px) 1.2px, calc(100% - 2px) 4px, 100% 8px,
                       100% 100%);
}

.somu-tabbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
    padding-bottom: .5rem;
}

.somu-tabbar-context {
    color: rgba(255, 255, 255, .72);
    font-size: 13px;
    white-space: nowrap;
}

/* action bar: one-line page summary on the left, the page's actions on the right; pinned under the tab row */
.somu-actionbar {
    position: sticky;
    top: var(--somu-header-height, 49px);
    z-index: 1020;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: .5rem 1rem;
}

.somu-actionbar .actionbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

/* actions that belong on the left of the bar (e.g. Automated Join info) push the rest right */
.somu-actionbar .actionbar-left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-right: auto;
}

.somu-actionbar .vr {
    height: 24px;
    align-self: center;
    margin: 0 .25rem;
}

.somu-actionbar .form-switch {
    margin: 0 .25rem;
}

/* page width: everything (tab row, action bar, page, status bar) is centred inside 1900px; content 1100px */
.somu-shell {
    width: 100%;           /* main is a flex item: auto margins would otherwise shrink it to its content */
    max-width: 1900px;
    margin-left: auto;
    margin-right: auto;
}

.somu-content {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

/* page body under the action bar */
.somu-page {
    padding: 1rem 1rem 1.5rem;
}

/* pages built around a tab control: the same space (50px) above the tabs and below the tab box */
.somu-page.somu-tabs-page {
    padding-top: 50px;
    padding-bottom: 50px;
}

/* run control: play/pause + clock in one pill; dark when idle, amber while auto-posting runs */
.run-control {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: #212529;
    color: #fff;
    border-radius: .375rem;
    padding: .375rem .75rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.run-control button {
    background: none;
    border: 0;
    padding: 0;
    color: inherit;
    line-height: 1;
    font-size: 1.15rem;
    display: inline-flex;
}

.run-control.running {
    background: #ffc107;
    color: #212529;
}

.run-control.playbar-disabled {
    opacity: .45;
}

/* table controls in one row: search + page length left, info + paging right.
   Pinned under the action bar so paging is at hand at the bottom of a long table;
   --somu-actionbar-bottom is kept up to date by site.js (the action bar can wrap to two rows). */
.somu-table-controls {
    position: sticky;
    top: var(--somu-actionbar-bottom, 112px);
    z-index: 1010;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #fff;
    padding: .5rem 0;
    margin: -1rem 0 .25rem;   /* cancels .somu-page's top padding so the strip meets the action bar when stuck */
}

.somu-table-controls .controls-left,
.somu-table-controls .controls-right {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

/* "Select all": first in the bar, its 16px box centred on the tick column (40px + the cell padding = 58px wide) */
.somu-table-controls .select-all {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    margin: 0;
    white-space: nowrap;
}
.somu-table-controls .select-all .form-check-input {
    margin: 0 0 0 21px;
    float: none;
}

.somu-table-controls .dataTables_filter label {
    margin: 0;
}

.somu-table-controls .dataTables_filter input {
    width: 208px;
    font-size: .875rem;
    padding: .25rem .5rem;
}

.somu-table-controls .dataTables_length label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 13px;
    color: #6c757d;
    white-space: nowrap;
}

.somu-table-controls .dataTables_length select {
    width: 76px;
    font-size: .875rem;
    padding: .25rem 1.75rem .25rem .5rem;
}

.somu-table-controls .dataTables_info {
    padding: 0 !important;
    font-size: 13px;
    color: #6c757d;
    white-space: nowrap;
}

.somu-table-controls .dataTables_paginate .pagination {
    margin: 0;
}

.somu-table-controls .dataTables_paginate .page-link {
    padding: .25rem .5rem;
    font-size: .875rem;
}

/* data table */
.somu-table {
    font-size: 14px;
}

.somu-table thead th {
    background: #f8f9fa;
}

/* the row open in the post dialog */
tr.row-highlight > td {
    background-color: #cfe2ff !important;
}

/* status bar: pinned to the bottom of the window; left = ephemeral messages (Status.flash), middle = the page's
   standing text (section "Status"), right = copyright */
.somu-footer {
    position: sticky;
    bottom: 0;
    z-index: 1020;
    background: #212529;
    color: rgba(255, 255, 255, .7);
    font-size: 13px;
    padding: 0 1rem;
}

.somu-statusbar {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: var(--somu-footer-height, 36px);
    padding: .35rem 0;
}

.somu-statusbar > div {
    flex: 1 1 0;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.somu-statusbar .status-left {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

/* the activity line (site.js Status): spinner + message, white; red for a failure; fades when idle */
.somu-statusbar .status-activity {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    min-width: 0;
    max-width: 100%;
    color: #fff;
    text-decoration: none;
    white-space: nowrap;
    transition: opacity .4s;
    cursor: default;
}

.somu-statusbar .status-activity.has-processes {
    cursor: pointer;
}

.somu-statusbar .status-activity .status-text {
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.somu-statusbar .status-activity .status-spinner {
    width: .8rem;
    height: .8rem;
    border-width: .15em;
    flex: 0 0 auto;
}

.somu-statusbar .status-activity.status-error {
    color: #f8a5a5;
}

.somu-statusbar .status-activity.fading {
    opacity: 0;
}

.status-jobs-panel {
    position: absolute;
    left: 0;
    bottom: 2.4rem;
    width: 26rem;
    max-width: 90vw;
    background: #fff;
    color: #212529;
    border: 1px solid #dee2e6;
    border-radius: .375rem;
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, .15);
    padding: .75rem;
    white-space: normal;
    z-index: 1030;
}

.status-jobs-panel .jobs-row + .jobs-row {
    margin-top: .6rem;
}

.status-jobs-panel .jobs-title {
    font-size: .875rem;
    margin-bottom: .2rem;
}

/* the middle part's figures (Status.setParts / Html.StatusCount): badges side by side */
.somu-statusbar .status-parts,
.somu-statusbar .status-parts > span[id] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.somu-statusbar .status-fixed {
    flex: 2 1 0;   /* the page text is the longest of the three */
    text-align: center;
}

.somu-statusbar .status-copyright {
    text-align: right;
}

.somu-statusbar .status-copyright a {
    color: inherit;
    text-decoration: underline dotted;
}

.somu-statusbar .status-logo {
    height: 18px;
    margin-left: 10px;
    vertical-align: -4px;
    opacity: .8;
}

/* e-mail text shown ready to copy (Participants: Automated Join info): wraps, body font */
.join-email {
    white-space: pre-wrap;
    font-family: inherit;
    font-size: 1rem;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: .375rem;
    padding: 1rem;
    margin: 0;
}

/* small buttons used in list rows (Bootstrap 5 has no btn-xs) */
.btn-xs {
    padding: .1rem .4rem;
    font-size: .8rem;
    line-height: 1.4;
}

/* platform icons in tabs and menus */
.platform-icon {
    width: 1.15em;
    height: 1.15em;
    vertical-align: -0.2em;
    margin-right: .35em;
}

/* tab headers: the active tab is blue (like a default action), the others grey */
.nav-tabs .nav-link {
    color: #6c757d;
}

.nav-tabs .nav-link:hover,
.nav-tabs .nav-link:focus {
    color: #495057;
}

.nav-tabs .nav-link.active {
    color: #0d6efd;
}

/* tabbed lists: the box runs from the tabs down to 50px above the status bar (height set by site.js) and
   scrolls inside; the scroll bar is always shown, and a bit wider, so it is obvious there is more content */
.somu-tab-content {
    height: var(--somu-tab-content-height, 60vh);
    overflow-y: scroll;
    overflow-x: auto;   /* a wide table scrolls sideways here, with the bar at the bottom of the box, not of the table */
    scrollbar-gutter: stable;
    scrollbar-width: auto;
    scrollbar-color: #adb5bd #f1f3f5;
    border: 1px solid #dee2e6;
    border-top: 0;
    padding: 1rem;
}

.somu-tab-content::-webkit-scrollbar {
    width: 14px;
}

.somu-tab-content::-webkit-scrollbar-track {
    background: #f1f3f5;
}

.somu-tab-content::-webkit-scrollbar-thumb {
    background: #adb5bd;
    border-radius: 7px;
    border: 3px solid #f1f3f5;
}

.nav-tabs .badge {
    margin-left: .4em;
}

/* Sessions: the scenario brief fills its tab */
.scenario-text {
    min-height: 40vh;
    resize: vertical;
}

/* Channels: names with a description show a hover box */
.channel-name[data-bs-toggle="tooltip"] {
    cursor: help;
}

/* Content: Generate content dialog */
.generate-platform-icon .platform-icon {
    width: 28px;
    height: 28px;
}

/* Deploy: a Content cell with posting status shows it on hover */
.deploy-content.has-status {
    cursor: help;
}

/* Deploy: "Select channel and post" dialog with search and collapsible platform sections */
#postMenu .modal-body {
    max-height: 70vh;
}

#postMenu .post-menu-search {
    position: sticky;
    top: 0;
    background: #fff;
    padding: .5rem .75rem;
    border-bottom: 1px solid #dee2e6;
    z-index: 1;
}

#postMenu .post-menu-section > button {
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#postMenu .post-menu-items {
    max-height: calc(12 * 2.1rem);
    overflow-y: auto;
}

#postMenu .post-menu-section > button .caret-open,
#postMenu .post-menu-section > button.collapsed .caret-closed {
    display: inline;
}

#postMenu .post-menu-section > button.collapsed .caret-open,
#postMenu .post-menu-section > button:not(.collapsed) .caret-closed {
    display: none;
}

#postMenu .post-menu-section > button {
    color: #212529;
}

/* Content: slimmer drop zone under the toolbar */
.drag-and-drop-area.compact {
    height: 6em;
}

/* Session, General tab: one settings table — name (i) | current value | edit; the (i) opens the explanation */
.somu-settings th {
    width: 22%;
    white-space: nowrap;
    vertical-align: top;
}

.somu-settings td.setting-value {
    vertical-align: top;
    word-break: break-word;
}

.somu-settings td.setting-actions {
    width: 1%;
    white-space: nowrap;
    text-align: right;
}

/* the (i) beside a label; its text is a popover, so the row never grows */
.info-button {
    color: #6c757d;
    line-height: 1;
    vertical-align: baseline;
    font-size: .95em;
}

.info-button:hover,
.info-button:focus {
    color: #0d6efd;
}

.popover {
    max-width: 380px;
}

/* Content: the Generate dialog keeps one height across its three steps, so the buttons never jump */
#generateModal .modal-content {
    height: min(570px, calc(100vh - 3.5rem));
}

/* Deploy: post dialog — Title with its label in front; content and the picture side by side */
.post-field {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.post-field > label {
    flex: 0 0 auto;
    margin: 0;
}

.post-body {
    display: flex;
    gap: .75rem;
    align-items: stretch;
}

.post-body .post-text {
    flex: 1 1 auto;
    min-width: 0;
}

.post-body .post-preview {
    flex: 0 0 38%;
    display: flex;
    flex-direction: column;
}

.post-body .post-preview .edit-image-strip {
    flex: 1 1 auto;
    overflow-y: auto;
    align-content: flex-start;
    border: 1px solid #dee2e6;
    border-radius: .375rem;
    padding: .5rem;
}

.post-body .post-preview .edit-image-strip img {
    height: auto;
    max-height: 150px;
    max-width: 100%;
}

/* Deploy table: fixed layout so the checkbox, Timing and Likes columns stay narrow and Content takes the rest */
.somu-table {
    table-layout: fixed;
}

.somu-table th.select-checkbox,
.somu-table td.select-checkbox {
    padding: .5rem .8rem;
}

/* percentages: the fixed layout hands what is left to Content. The tick column is a fixed 40px so the "Select all"
   box in the controls bar (.select-all) can sit straight above the row ticks. */
.somu-table th.select-col { width: 40px; }
.somu-table th.actions-cell,
.somu-table th.actions-col { width: 7%; }
.somu-table th.col-timing  { width: 6.5%; }
.somu-table th.col-platform { width: 7.5%; }
.somu-table th.col-channel { width: 14%; }
.somu-table th.col-title   { width: 18%; }
.somu-table th.col-likes   { width: 4.5%; }

.somu-table td {
    overflow-wrap: anywhere;
}

/* a small dialog on top of another (Image… → Generate over the post dialog) */
.modal.modal-stacked {
    z-index: 1075;
}

.modal-backdrop.backdrop-stacked {
    z-index: 1070;
}

/* movable dialogs (site.js): dragged by the header, over a light overlay so the page behind can be read */
.modal-movable .modal-header {
    cursor: move;
    user-select: none;
    touch-action: none;
}

.modal-movable .modal-header .btn-close {
    cursor: pointer;
}

.modal-backdrop.backdrop-light {
    opacity: .15;
}

/* stopped clones (Overview switch off): greyed everywhere */
.nav-tabs .nav-link.tab-stopped {
    color: #adb5bd;
    font-style: italic;
}

.nav-tabs .nav-link.tab-stopped .platform-icon {
    filter: grayscale(1);
    opacity: .6;
}

.tab-pane.pane-stopped .list-group-item {
    color: #6c757d;
    background: #f8f9fa;
}

#postMenu .post-menu-stopped .platform-icon,
.platform-row.table-secondary .platform-icon,
.form-check.text-muted .platform-icon {
    filter: grayscale(1);
    opacity: .6;
}

.platform-row.table-secondary .platform-name {
    color: #6c757d;
}

/* Channels page: the profile picture beside the channel name, and its preview in the edit dialog */
.channel-avatar { width: 40px; height: 40px; object-fit: cover; }
.channel-avatar-empty { display: inline-flex; align-items: center; justify-content: center; background: #e9ecef; color: #6c757d; font-size: 1.2rem; }
#channelAvatarPreview { width: 100%; max-width: 420px; max-height: 220px; object-fit: contain; background: #f8f9fa; border: 1px solid #dee2e6; border-radius: .375rem; }
#channelAvatarEmpty { max-width: 420px; height: 140px; border: 1px dashed #ced4da; border-radius: .375rem; color: #6c757d; display: flex; align-items: center; justify-content: center; }

/* Deploy: hovering a channel name shows the channel's picture and description */
.channel-hover { cursor: help; border-bottom: 1px dotted #adb5bd; }
.channel-popover { max-width: 300px; }
.channel-popover-avatar { display: block; max-width: 100%; max-height: 160px; object-fit: contain; border-radius: .25rem; margin-bottom: .5rem; }

/* dataset marks shared by the Content list, the editor's menu and the Timeline page */
.ds-llm { font-size: .62rem; font-weight: 700; border-radius: 1rem; border: 1px solid #6f42c1; color: #6f42c1; padding: 0 5px; }

/* the Content page's Edit dataset dialog: nearly the whole window, the editor page in a frame */
.modal-dataset-editor { max-width: min(1800px, 96vw); margin: 2vh auto; }
.modal-dataset-editor .modal-content { height: 96vh; }
.modal-dataset-editor .modal-body { flex: 1 1 auto; min-height: 0; }
#editDatasetFrame { display: block; width: 100%; height: 100%; border: 0; }
/* a page inside such a frame has no tab row: its tool row sticks at the top */
.somu-in-dialog .somu-actionbar { top: 0; }

/* resizable-columns.js: the handle on a header cell's right edge */
th.col-resizable { position: relative; }
.col-resize-handle { position: absolute; top: 0; right: -3px; bottom: 0; width: 7px; cursor: col-resize; z-index: 1;
    background: linear-gradient(to right, transparent 2px, #ced4da 2px, #ced4da 4px, transparent 4px); }
.col-resize-handle:hover { background: linear-gradient(to right, transparent 1px, #0d6efd 1px, #0d6efd 5px, transparent 5px); }

/* ---------------------------------------------------------------------------------------------------------------
   Help: the floating help panel (help-panel.js) and the full help page (Views/Help/Page.cshtml).
   The panel lies over the page it describes: movable by its title bar, resizable from its lower right corner. */
.help-panel {
    position: fixed;
    display: flex;
    flex-direction: column;
    min-width: 320px;
    min-height: 240px;
    max-width: calc(100vw - 8px);
    max-height: calc(100vh - 8px);
    z-index: 1065;                 /* above an open dialog, so the help for a dialog can be read beside it */
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: .5rem;
    box-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .25);
    resize: both;
    overflow: hidden;
}

.help-panel.help-panel-narrow {    /* small windows: the whole width, lower two thirds, no moving or resizing */
    left: 4px;
    right: 4px;
    bottom: 4px;
    top: 30vh;
    resize: none;
}

.help-panel-title {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    background: #6c757d;           /* the info view: the secondary colour */
    color: #fff;
    user-select: none;
    flex: 0 0 auto;
}

.help-info .help-panel-title { cursor: move; }
.help-guide .help-panel-title { background: #0d6efd; }     /* the guide: the primary colour */
.help-guide .help-panel-title { padding: 2px 4px 2px 10px; }
.help-guide .help-panel-name { font-size: .9rem; }
.help-guide .help-tool { width: 1.6rem; height: 1.6rem; }

/* The guide: the small box the Help button opens first, lower right above the status bar. Not movable or resizable;
   its height follows its text. */
.help-panel.help-guide {
    right: 24px;
    bottom: 64px;
    width: 26rem;
    min-height: 0;
    max-height: calc(100vh - 140px);
    resize: none;
}

.help-guide .help-panel-body { padding: 10px 14px 4px; font-size: .875rem; }
.help-guide .help-guide-text > :last-child { margin-bottom: .5rem; }

.help-panel-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px 16px;
    flex: 0 0 auto;
}

/* the small guide: tighter footer, small buttons (the welcome keeps the roomier one) */
.help-guide:not(.help-welcome) .help-panel-footer { padding: 6px 14px 10px; }
.help-guide:not(.help-welcome) .help-panel-footer .btn { padding: .25rem .6rem; font-size: .875rem; }

/* The welcome (the guide on Overview): large, centred, with tabs */
.help-panel.help-guide.help-welcome {
    right: auto;
    bottom: auto;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 46rem;
    height: min(80vh, 46rem);
    max-height: calc(100vh - 32px);
}

.help-welcome .help-guide-text { font-size: 1.05rem; }
.help-tabs { margin: 10px 0 6px; }
.help-tabs .nav-link { padding: .35rem .9rem; }
.help-tab-pane { font-size: .95rem; }

.help-panel-narrow .help-panel-title { cursor: default; }

/* the title bar in three parts, so that Practical | Background sits in the middle of the box */
.help-panel-left { display: flex; align-items: center; gap: 6px; flex: 1 1 0; min-width: 0; }
.help-panel-right { display: flex; justify-content: flex-end; flex: 0 0 auto; }
.help-mode:not(.d-none) ~ .help-panel-right { flex: 1 1 0; }
.help-info .help-guide-icon { display: none; }

.help-panel-name {
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.help-tool {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 0;
    border-radius: .375rem;
    background: transparent;
    color: #fff;
    text-decoration: none;
}

.help-tool:hover, .help-tool:focus-visible { background: rgba(255, 255, 255, .18); color: #fff; }
.help-mode .btn { padding-top: .1rem; padding-bottom: .1rem; }
.help-mode .btn.active { background: #fff; color: #212529; }

.help-panel-body {
    flex: 1 1 auto;
    overflow: auto;
    padding: 4px 18px 24px;
    font-size: .92rem;
    line-height: 1.5;
}

.help-panel-body.help-loading { opacity: .5; }

/* the check list (Practical | Background | Check): the staff's own ticks */
.help-check-intro { margin: 12px 0 10px; color: #495057; }
.help-check-count { margin-bottom: 8px; font-weight: 600; color: #0d6efd; }
.help-check-list { list-style: none; margin: 0 0 1rem; padding: 0; }
.help-check-item { display: flex; align-items: flex-start; gap: 10px; padding: 7px 8px; border-top: 1px solid #e9ecef; }
.help-check-item:last-child { border-bottom: 1px solid #e9ecef; }
.help-check-item.help-check-sub { padding-left: 34px; }
.help-check-item.here { background: #f1f6ff; }                 /* the points that belong to the page that is open */
.help-check-item .form-check-input { flex: 0 0 auto; margin-top: .2rem; width: 1.1rem; height: 1.1rem; cursor: pointer; pointer-events: auto; }
.help-check-item label { flex: 1 1 auto; cursor: pointer; }
.help-check-item.done label { color: #6c757d; text-decoration: line-through; }
.help-check-go { flex: 0 0 auto; font-size: 1.15rem; line-height: 1.2; color: #0d6efd; text-decoration: none; }
.help-check-go:hover { color: #0a58ca; }
.help-panel-body:focus { outline: none; }
.help-panel-body h1 { font-size: 1.45rem; margin: 14px 0 10px; }
.help-panel-body h2 { font-size: 1.15rem; margin: 22px 0 8px; padding-top: 4px; border-top: 1px solid #e9ecef; scroll-margin-top: 4px; }
.help-panel-body h3 { font-size: 1rem; margin: 16px 0 6px; }
/* headings in colour by level, to find one's way by eye */
.help-panel-body h1 { color: #d9344f; }
.help-panel-body h2 { color: #d6722f; }
.help-panel-body h3 { color: #d9a441; }
.help-panel-body h4 { color: #94b84f; }
.help-panel-body h5 { color: #5b9bd5; }
.help-panel-body h6 { color: #9b7fd1; }
.help-panel-body img { max-width: 100%; height: auto; border: 1px solid #dee2e6; border-radius: .25rem; cursor: zoom-in; }
.help-panel-body table { width: 100%; margin-bottom: 1rem; border-collapse: collapse; }
.help-panel-body th, .help-panel-body td { padding: 4px 8px; border: 1px solid #dee2e6; vertical-align: top; }
.help-panel-body th { background: #f8f9fa; }
.help-panel-body blockquote { margin: 0 0 1rem; padding: 6px 12px; border-left: 4px solid #0dcaf0; background: #f8f9fa; }
.help-panel-body code { color: #b02a37; }
.help-panel-body input { pointer-events: none; }          /* pictures of controls inside the help text, not controls */

/* the contents menu of the help box: every help page, the parts of the page shown indented under it */
.help-panel [data-help="contents"] {
    max-height: 70vh;
    min-width: 17rem;
    overflow-y: auto;
    font-size: .85rem;
}

.help-panel [data-help="contents"] .dropdown-item { padding: 3px 14px; }

.help-panel [data-help="contents"] .help-contents-part {
    padding-left: 30px;
    font-size: .8rem;
    color: #6c757d;
    white-space: normal;
}

.help-enlarged {
    position: fixed;
    inset: 0;
    z-index: 1090;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, .7);
    cursor: zoom-out;
}

.help-enlarged img { max-width: 100%; max-height: 100%; background: #fff; border-radius: .25rem; }

.help-page { display: flex; gap: 24px; align-items: flex-start; padding: 16px 0 32px; }
.help-page-contents { flex: 0 0 14rem; display: flex; flex-direction: column; position: sticky; top: 16px; font-size: .92rem; }
.help-page-contents a { padding: 4px 10px; border-radius: .375rem; color: #212529; text-decoration: none; }
.help-page-contents a:hover { background: #e9ecef; }
.help-page-contents a.active { background: #0d6efd; color: #fff; }
.help-page-contents .help-page-home { font-weight: 600; margin-bottom: 6px; }
.help-page-body { flex: 1 1 auto; min-width: 0; max-width: 56rem; overflow: visible; padding: 0; font-size: 1rem; }

@media (max-width: 800px) {
    .help-page { flex-direction: column; }
    .help-page-contents { position: static; flex-basis: auto; flex-direction: row; flex-wrap: wrap; }
}

@media print {
    .help-page-contents, .somu-footer, header { display: none !important; }
}

/* ---- Session page: the sub-tabs of Advanced settings, and the logins on the Overview page ---- */
.somu-subtabs {
    gap: 4px;
    padding-left: 8px;
    margin-bottom: 0 !important;
    border-bottom: 1px solid #dee2e6;
}

.somu-subtabs .nav-link {
    padding: .3rem .85rem;
    font-size: .9rem;
    color: #495057;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-bottom: 0;
    border-radius: .375rem .375rem 0 0;
    margin-bottom: -1px;            /* the open tab covers the row's bottom line */
}

.somu-subtabs .nav-link:hover { background: #e9ecef; color: #212529; }

.somu-subtabs .nav-link.active {
    background: #fff;
    color: #0d6efd;
    font-weight: 600;
    border-bottom: 1px solid #fff;
}

/* the open sub-tab's settings: framed, joined to the tab row above */
#pane-advanced > .tab-content {
    padding: 1rem;
    border: 1px solid #dee2e6;
    border-top: 0;
    border-radius: 0 0 .375rem .375rem;
}

/* inside the settings dialog only named parts show: no tab row there, so no frame either */
.somu-only-sections #pane-advanced > .tab-content { padding: 0; border: 0; }

.somu-subtabs .badge { font-size: .65rem; font-weight: 500; }

.somu-logins { width: auto; }

.somu-logins th { width: 14rem; white-space: nowrap; }

.somu-logins td, .somu-logins th { border: 0; padding: .15rem .5rem .15rem 0; }

/* ---- "Settings for this page" (settings-dialog.js): the Session page in a frame, only the named parts shown ---- */
.modal-page-settings { max-width: min(1000px, 94vw); }
.modal-page-settings .modal-content { height: min(720px, 90vh); }
.modal-page-settings .modal-body { flex: 1 1 auto; min-height: 0; }
#pageSettingsFrame { display: block; width: 100%; height: 100%; border: 0; }

/* the Session page in that frame: no tab rows, every tab laid out under the other, parts not asked for hidden */
.somu-only-sections:not(.sections-ready) { visibility: hidden; }
.somu-page.somu-only-sections { padding-top: 12px; padding-bottom: 12px; }
.somu-only-sections .nav { display: none; }
.somu-only-sections .somu-tab-content { height: auto; overflow: visible; border: 0; padding: 0; }
.somu-only-sections .tab-content > .tab-pane { display: block; opacity: 1; height: auto !important; }
.somu-only-sections .tab-content > .tab-pane.section-empty { display: none; }
.somu-only-sections [data-section]:not(.section-on),
.somu-only-sections .section-intro { display: none !important; }
.somu-only-sections [data-section].section-on { margin-bottom: 1.25rem; }
.somu-only-sections tr[data-section].section-on { margin-bottom: 0; }
.somu-only-sections #scenario-form textarea { min-height: 20rem; }
/* no tool row and no status bar of its own: messages go to the status bar of the page that opened the dialog */
body.somu-in-dialog:has(.somu-only-sections) .somu-actionbar,
body.somu-in-dialog:has(.somu-only-sections) .somu-footer { display: none; }
