/* Shared UI tokens. Figure colors and scientific fonts belong to the plotting functions. */
:root {
  --c-primary:#3c5488;--c-primary-strong:#2d3f66;--c-text:#1a202c;--c-text-2:#4a5568;--c-text-3:#718096;
  --c-success:#00866d;--c-warning:#b35c00;--c-danger:#b93a28;
  --c-surface:#fff;--c-bg:#f5f7fa;--c-border:#e2e8f0;
  --s-1:4px;--s-2:8px;--s-3:12px;--s-4:16px;--s-6:24px;--s-8:32px;
  --radius-sm:6px;--radius-md:10px;--radius-lg:14px;
  --ui-shadow-card:0 1px 2px rgba(16,24,40,.06);--ui-shadow-float:0 8px 24px rgba(16,24,40,.12);
  --ui-sidebar-width:248px;--ui-header-height:56px;
}
body .app-shell [hidden],body .main-header [hidden] {display:none!important;}
body .app-shell {font-family:var(--font-ui);}
body .content-wrapper.authed {background:var(--c-bg);min-height:calc(100vh - 56px)!important;color:var(--c-text);}
body .content-wrapper.authed>.content {max-width:1600px;padding:24px;margin:auto;}
body .content-wrapper.authed .row {margin-left:-8px;margin-right:-8px;}
body .content-wrapper.authed [class*="col-"] {padding-left:8px;padding-right:8px;min-width:0;}
body .content-wrapper.authed .box {border:1px solid var(--c-border);border-top:1px solid var(--c-border);border-radius:var(--radius-md);box-shadow:var(--ui-shadow-card);background:#fff;margin-bottom:16px;}
body .content-wrapper.authed .box>.box-header {padding:16px 20px;background:#fff!important;color:var(--c-text)!important;border-bottom:1px solid var(--c-border);border-radius:10px 10px 0 0;}
body .content-wrapper.authed .box>.box-header .box-title {font-size:var(--ui-size-subsection);font-weight:600;color:var(--c-text)!important;line-height:1.45;}
body .content-wrapper.authed .box>.box-body {padding:20px;min-width:0;}
body .content-wrapper.authed .btn,.ui-empty .btn {border-radius:var(--radius-sm);min-height:36px;padding:8px 12px;font-size:14px;line-height:18px;box-shadow:none;text-shadow:none;white-space:normal;}
/* Compatibility rules override the old inline colors and Bootstrap mixed classes. */
body .content-wrapper.authed .btn-default,body .content-wrapper.authed .btn-info,
body .content-wrapper.authed .btn-success,body .content-wrapper.authed .btn-warning,
body .content-wrapper.authed .btn-secondary,body .content-wrapper.authed .ui-btn-secondary {
  background:#fff!important;color:var(--c-primary)!important;border:1px solid var(--c-primary)!important;
}
body .content-wrapper.authed .btn-primary,body .content-wrapper.authed .btn-run,
body .content-wrapper.authed .ui-btn-primary {background:var(--c-primary)!important;color:#fff!important;border:1px solid var(--c-primary)!important;}
body .content-wrapper.authed a.shiny-download-link,body .content-wrapper.authed .ui-download {
  background:#fff!important;color:var(--c-primary)!important;border:1px solid var(--c-primary)!important;border-radius:6px;text-decoration:none;min-height:36px;
}
body .content-wrapper.authed .ui-btn-text {color:var(--c-primary)!important;background:transparent!important;border:1px solid transparent!important;}
body .content-wrapper.authed .btn-danger {background:#fff!important;color:var(--c-danger)!important;border:1px solid var(--c-danger)!important;}
body .content-wrapper.authed .btn:hover {filter:none;box-shadow:none;}
body .content-wrapper.authed .ui-btn-primary:hover,body .content-wrapper.authed .btn-primary:hover {background:var(--c-primary-strong)!important;}
body .content-wrapper.authed .ui-download:hover,body .content-wrapper.authed .ui-btn-secondary:hover {background:#eef2f8!important;}
body .content-wrapper.authed .btn:disabled {opacity:1!important;background:#edf0f4!important;border-color:#b5bfce!important;color:var(--c-text-2)!important;cursor:not-allowed;}
body .content-wrapper.authed .dta-result-download-locked {opacity:1!important;background:#f5f7fa!important;color:var(--c-primary)!important;}
body .content-wrapper.authed .btn:focus-visible,body .main-sidebar a:focus-visible,
body .main-sidebar button:focus-visible,body .main-sidebar summary:focus-visible,
.ui-workflow-card:focus-visible,summary:focus-visible,.ui-recent-card:focus-visible {
  outline:3px solid var(--c-primary);outline-offset:3px;
}
.ui-help {color:var(--c-text-2);font-size:13px;line-height:1.65;}
body .content-wrapper.authed :is(.help-block,.text-muted,small) {color:var(--c-text-2);}
body .app-shell :is(p,span,small,label)[style*="color:#a0aec0" i],
body .app-shell :is(p,span,small,label)[style*="color: #a0aec0" i],
body .app-shell :is(p,span,small,label)[style*="color:#999" i],
body .app-shell :is(p,span,small,label)[style*="color: #999" i] {color:var(--c-text-2)!important;}
body .modal-content {border-radius:var(--radius-lg);border:1px solid var(--c-border);box-shadow:var(--ui-shadow-float);}
body .content-wrapper.authed label {color:var(--c-text);font-weight:500;}
body .content-wrapper.authed .form-control {border-color:#b5bfce;min-height:36px;border-radius:6px;color:var(--c-text);box-shadow:none;}
body .content-wrapper.authed .form-control:focus {border-color:var(--c-primary);box-shadow:0 0 0 3px rgba(60,84,136,.12);}
.ui-kpi {background:#fff;border:1px solid var(--c-border);border-radius:10px;box-shadow:var(--ui-shadow-card);padding:16px 20px;min-height:108px;margin-bottom:16px;display:flex;flex-direction:column;gap:8px;overflow-wrap:anywhere;}
.ui-kpi-label {font-size:13px;color:var(--c-text-2);display:flex;align-items:center;gap:8px;}
.ui-kpi-icon {font-size:16px;color:var(--c-text-2);}
.ui-kpi-value {font-size:28px;line-height:1.2;font-weight:600;font-variant-numeric:tabular-nums;color:var(--c-text);}
.ui-kpi-note {font-size:13px;color:var(--c-text-2);margin:0;}
.ui-kpi-warning {border-left:3px solid var(--c-warning);}
.ui-kpi-link {text-decoration:none;color:inherit;}
.ui-figure {position:relative;min-width:0;max-width:100%;overflow:visible;background:#fff;}
.ui-figure-empty {min-height:240px;}
.ui-figure-ratio .shiny-plot-output {height:var(--ui-preview-height)!important;}
.ui-figure-ratio .shiny-plot-output>img {width:100%!important;height:100%!important;object-fit:contain;}
.ui-figure .shiny-plot-output {max-width:100%;}
.ui-figure .shiny-plot-output.recalculating {opacity:1;}
.ui-table-scroll .recalculating {opacity:1;}
.ui-figure .shiny-plot-output>img {max-width:100%;max-height:100%;object-fit:contain;}
.ui-figure>.ui-empty {display:none;}
.ui-figure.ui-figure-empty>.ui-empty {display:flex;position:absolute;inset:0;background:#fff;z-index:2;}
.ui-figure.ui-figure-empty>.shiny-plot-output {opacity:0;pointer-events:none;}
.ui-figure.ui-figure-error>.shiny-plot-output {visibility:visible;}
.ui-figure.ui-figure-error>.ui-empty {display:none;}
.ui-empty {min-height:220px;padding:32px 24px;align-items:center;justify-content:center;flex-direction:column;text-align:center;gap:12px;display:flex;border-radius:10px;color:var(--c-text);}
.ui-empty-icon {font-size:32px;color:var(--c-text-2);line-height:1;}
.ui-empty-title {font-size:16px;font-weight:600;}
.ui-empty-hint {font-size:13px;color:var(--c-text-2);max-width:430px;margin:0;}
.ui-empty-actions {display:flex;gap:8px;flex-wrap:wrap;justify-content:center;}
.ui-disclosure {border:1px solid var(--c-border);background:#fff;border-radius:10px;margin:16px 0;}
.ui-disclosure>summary {cursor:pointer;padding:12px 16px;color:var(--c-text-2);font-size:14px;font-weight:500;}
.ui-disclosure-body {padding:0 16px 16px;line-height:1.7;color:var(--c-text-2);font-size:14px;overflow-wrap:anywhere;}
.ui-method-refs {clear:both;}
.ui-method-refs .ui-disclosure {margin-top:8px;}
.ui-method-refs li {margin-bottom:12px;}
.ui-method-refs a {color:var(--c-primary);}
.dtam-method-prose {font-family:var(--font-ui);font-size:15px;line-height:1.8;color:var(--c-text-2);padding:0 8px;max-width:1080px;}
.dtam-method-prose p {margin-bottom:14px;}
.dtam-method-formula {font-family:var(--font-ui);background:#f5f7fa;border:1px solid var(--c-border);border-left:3px solid var(--c-primary);padding:16px 20px;border-radius:8px;margin:16px 0;}
.dtam-method-equation {font-family:var(--font-ui);font-size:18px;font-weight:500;line-height:1.8;letter-spacing:.01em;overflow-x:auto;white-space:nowrap;padding-bottom:4px;}
.dtam-method-formula p {font-size:14px;line-height:1.7;margin:8px 0 0;}
.dtam-method-formula sub {font-size:.7em;}
.ui-table-scroll,.dataTables_wrapper,.result-table-scroll {max-width:100%;min-width:0;overflow-x:auto;overscroll-behavior-x:contain;}
.ui-table-scroll {border-radius:6px;}
.ui-table-scroll>.datatables {min-height:100px;}
body .content-wrapper.authed .shiny-input-container .input-group-btn .btn {white-space:nowrap!important;min-width:88px;}
body .content-wrapper.authed table.dataTable {font-size:13px;font-variant-numeric:tabular-nums;}
body .content-wrapper.authed table.dataTable th {background:#f5f7fa;color:var(--c-text);position:sticky;top:0;z-index:1;}
body .content-wrapper.authed table.dataTable td.dt-right {text-align:right;}
#shiny-tab-quadas2 table.dataTable td:first-child,#shiny-tab-quadas3 table.dataTable td:first-child,
#shiny-tab-quadas2 table.dataTable th:first-child,#shiny-tab-quadas3 table.dataTable th:first-child {position:sticky;left:0;z-index:2;background:#fff;box-shadow:1px 0 0 var(--c-border);}
.ui-export-bar {display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap;padding:16px 0 0;margin-top:16px;border-top:1px solid var(--c-border);}
.ui-export-bar .form-group {margin-bottom:0;}
.ui-export-bar .plot-dl-buttons,.ui-export-bar .plot-dl-size-row {display:flex;gap:8px;flex-wrap:wrap;align-items:flex-end;}
.ui-export-bar .plot-dl-size-row .form-group {max-width:140px;}
.ui-export-bar .btn {flex-shrink:0;}
.ui-export-bar .ui-export-style {margin-left:auto;}
/* Bound export nodes are grouped once; do not retain Bootstrap grid widths. */
body .content-wrapper.authed .ui-export-bar[data-ui-export-ready] {float:none;width:100%;max-width:100%;margin:16px 0 0!important;padding:16px 0 0!important;clear:both;box-sizing:border-box;}
.ui-export-actions {display:flex;flex-wrap:wrap;align-items:center;gap:8px;max-width:100%;}
body .content-wrapper.authed .ui-export-actions .btn {width:auto!important;min-width:0;max-width:100%;margin:0!important;white-space:nowrap;}
.ui-export-sizes {display:flex;gap:8px;align-items:flex-end;flex-wrap:nowrap;max-width:100%;flex:0 0 auto;}
body .content-wrapper.authed .ui-export-sizes .shiny-input-container {width:112px!important;max-width:calc((100vw - 88px)/2);min-width:0;flex:0 0 112px;margin:0;}
body .content-wrapper.authed .ui-export-sizes .control-label {display:block;margin:0 0 6px;white-space:nowrap;font-size:12px;color:var(--c-text-2);}
body .content-wrapper.authed .ui-export-sizes .form-control {width:100%!important;height:36px;}
body .content-wrapper.authed .ui-export-bar .ui-export-style {width:auto!important;flex:0 0 auto;margin:0;white-space:nowrap;}
.ui-export-menu {position:relative;flex-shrink:0;}
.ui-export-menu>summary {list-style:none;}
.ui-export-menu>summary::-webkit-details-marker {display:none;}
.ui-export-menu-panel {position:absolute;right:0;top:100%;z-index:30;padding:8px;background:#fff;border:1px solid var(--c-border);border-radius:10px;box-shadow:var(--ui-shadow-float);min-width:210px;display:grid;gap:4px;}
.ui-export-menu-panel .shiny-download-link {text-align:left;}
.ui-figure-menu {position:relative;}
.ui-figure-menu>summary {list-style:none;}
.ui-figure-menu>summary::-webkit-details-marker {display:none;}
.ui-figure-menu-panel {position:absolute;right:0;top:100%;z-index:40;min-width:160px;padding:8px;border:1px solid var(--c-border);border-radius:10px;background:#fff;box-shadow:var(--ui-shadow-float);display:grid;gap:4px;}
.ui-figure-menu-panel button {text-align:left;}
body .content-wrapper.authed .box-tools .btn {color:var(--c-primary)!important;}
.ui-figure[data-plot-id="sroc_plot"] {max-width:960px;margin-left:auto;margin-right:auto;}
/* Four ranking cards: heatmap / scatter, rankogram / cumulative curves. */
.ui-sucra-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start;}
.ui-sucra-grid>.row {display:contents;}
.ui-sucra-grid>.row::before,.ui-sucra-grid>.row::after {content:none;}
body .content-wrapper.authed .ui-sucra-grid>.row>[class*="col-"] {float:none;width:auto;min-width:0;padding:0;}
body .content-wrapper.authed .ui-sucra-grid .box {margin-bottom:0;}
.ui-sucra-grid .ui-figure,.ui-sucra-grid .shiny-plot-output {min-width:0;}
.ui-sucra-grid .shiny-plot-output>img {width:100%!important;height:100%!important;object-fit:contain;}
.ui-figure-lightbox {max-width:calc(100vw - 32px);max-height:calc(100vh - 32px);padding:18px;border:1px solid var(--c-border);border-radius:12px;background:#fff;box-shadow:var(--ui-shadow-float);}
.ui-figure-lightbox::backdrop {background:rgba(18,32,49,.58);}
.ui-figure-lightbox>.btn {display:block;margin:0 0 12px auto;}
.ui-figure-lightbox-scroll {max-width:calc(100vw - 72px);max-height:calc(100vh - 128px);overflow:auto;}
.ui-figure-lightbox-scroll img {display:block;max-width:none;max-height:none;}
@media(max-width:767px) {.ui-sucra-grid {grid-template-columns:minmax(0,1fr);}}
body .content-wrapper.authed .btn.disabled {opacity:1!important;color:var(--c-text-2)!important;background:#edf0f4!important;}
.ui-module-status {margin-bottom:16px;}
.ui-status-source {display:none;}
.ui-status-source.is-current {display:block;}
.ui-module-status:empty {display:none;}
body .content-wrapper.authed .alert {border-radius:6px;font-size:14px;line-height:1.6;box-shadow:none;padding:12px 16px;}
body .content-wrapper.authed .alert-info {background:#eef2f8!important;color:var(--c-text)!important;border:1px solid var(--c-border)!important;border-left:3px solid var(--c-primary)!important;}
body .content-wrapper.authed .alert-warning {background:#fff8ef!important;color:#703d00!important;border:1px solid #edceaa!important;border-left:3px solid var(--c-warning)!important;}
body .content-wrapper.authed .alert-danger {background:#fff4f2!important;color:#822819!important;border:1px solid #edc5bf!important;border-left:3px solid var(--c-danger)!important;}
body .content-wrapper.authed .alert-success {background:#eff9f6!important;color:#005d4c!important;border:1px solid #bcddd4!important;border-left:3px solid var(--c-success)!important;}
.ui-page-head {display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:16px;margin:0 0 20px;}
.ui-page-head h2 {font-size:19px;font-weight:600;line-height:1.45;margin:0 0 4px;color:var(--c-text);}
.ui-page-head p {margin:0;color:var(--c-text-2);font-size:13px;}
.ui-steps {display:flex;list-style:none;padding:0;margin:0;gap:4px;align-items:center;flex-wrap:wrap;}
.ui-step {display:flex;align-items:center;gap:6px;font-size:12px;color:var(--c-text-2);}
.ui-step button {border:0;background:transparent;border-radius:6px;padding:8px;color:inherit;}
.ui-step.is-active button {background:#eef2f8;color:var(--c-primary);font-weight:600;}
.ui-step.is-done .ui-step-number {color:var(--c-success);}
.ui-step-number {border:1px solid currentColor;border-radius:50%;display:inline-flex;width:20px;height:20px;align-items:center;justify-content:center;margin-right:6px;}
.ui-data-layout {display:grid;grid-template-columns:minmax(270px,1fr) minmax(0,2fr);gap:16px;align-items:start;}
.ui-settings-column {position:sticky;top:80px;}
.ui-settings-card,.ui-data-preview {background:#fff;border:1px solid var(--c-border);border-radius:10px;padding:20px;box-shadow:var(--ui-shadow-card);}
.ui-settings-card {padding:0;display:flex;flex-direction:column;max-height:calc(100dvh - 180px);}
.ui-settings-scroll {overflow-y:auto;min-height:0;padding:20px;}
.ui-settings-heading h3,.ui-data-preview h3 {font-size:16px;font-weight:600;margin:0 0 8px;}
.ui-settings-heading p {font-size:13px;color:var(--c-text-2);margin:0 0 20px;}
.ui-settings-card h4 {font-size:14px;font-weight:600;}
.ui-settings-grid {display:grid;grid-template-columns:1fr 1fr;gap:8px;}
.ui-settings-card .form-group {width:auto!important;min-width:0;}
.ui-settings-card .ui-disclosure {margin:16px 0;}
.ui-settings-footer {flex-shrink:0;background:#fff;padding:16px 20px;border-top:1px solid var(--c-border);border-radius:0 0 10px 10px;}
.ui-settings-footer .ui-run-feedback {margin-top:12px;font-size:13px;line-height:1.65;color:var(--c-text-2);}
.ui-assist-actions {display:flex;align-items:center;gap:4px;flex-wrap:wrap;}
.ui-data-column {min-width:0;}
.ui-data-column .ui-kpi {padding:16px 12px;}
.ui-data-column .ui-kpi-label {font-size:12px;}
.ui-qc-summary {border:1px solid var(--c-border);border-radius:10px;background:#fff;padding:16px 20px;margin-bottom:16px;}
.ui-qc-summary h3 {font-size:14px;font-weight:600;margin:0 0 12px;}
.ui-qc-row {display:flex;gap:12px;align-items:flex-start;padding:8px 0;border-top:1px solid var(--c-border);font-size:13px;}
.ui-qc-row:first-of-type {border-top:0;}
.ui-qc-row p {margin:4px 0 0;color:var(--c-text-2);}
.ui-badge {display:inline-flex;align-items:center;white-space:nowrap;border-radius:4px;padding:2px 6px;font-size:12px;font-weight:500;background:#eef2f8;color:var(--c-primary);}
.ui-badge-warning {color:#703d00;background:#fff2df;}
.ui-badge-danger {color:#822819;background:#ffeae5;}
.ui-welcome {display:flex;align-items:center;justify-content:space-between;gap:24px;background:#fff;padding:24px;border:1px solid var(--c-border);border-radius:10px;box-shadow:var(--ui-shadow-card);margin-bottom:24px;}
.ui-eyebrow {font-size:12px;color:var(--c-text-2);margin:0 0 8px;}
.ui-welcome h2 {font-size:26px;font-weight:600;margin:0 0 8px;line-height:1.35;}
.ui-welcome .ui-welcome-meta {font-size:13px;color:var(--c-text-2);display:flex;gap:12px;flex-wrap:wrap;}
.ui-home-section {margin-bottom:24px;}
.ui-section-heading {display:flex;justify-content:space-between;gap:12px;align-items:baseline;margin-bottom:16px;}
.ui-section-heading h3 {font-size:16px;font-weight:600;margin:0;color:var(--c-text);}
.ui-workflow-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;}
.ui-recent-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;}
.ui-workflow-card {padding:20px;border:1px solid var(--c-border);border-radius:10px;background:#fff;text-align:left;box-shadow:var(--ui-shadow-card);color:var(--c-text);transition:border-color .18s;}
.ui-workflow-card:hover {border-color:var(--c-primary);}
.ui-workflow-top {display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;}
.ui-workflow-icon {width:36px;height:36px;border-radius:6px;background:#eef2f8;color:var(--c-primary);display:flex;align-items:center;justify-content:center;font-size:18px;}
.ui-workflow-index {font-size:12px;color:var(--c-text-2);font-variant-numeric:tabular-nums;}
.ui-workflow-card h4 {font-size:16px;font-weight:600;margin:0 0 8px;}
.ui-workflow-card p {font-size:13px;line-height:1.65;color:var(--c-text-2);margin:0 0 20px;min-height:43px;}
.ui-workflow-bottom {display:flex;align-items:center;justify-content:space-between;font-size:12px;color:var(--c-primary);}
.ui-recent-card {background:#fff;border:1px solid var(--c-border);border-radius:10px;padding:16px;text-align:left;color:var(--c-text);display:flex;flex-direction:column;gap:8px;}
.ui-recent-card strong {font-size:14px;font-weight:500;}
.ui-recent-card span,.ui-recent-card time {color:var(--c-text-2);font-size:12px;}
.ui-recent-empty {grid-column:1/-1;margin:0;padding:20px;border:1px dashed #b5bfce;border-radius:10px;font-size:13px;color:var(--c-text-2);background:#fff;}
.ui-resource-grid {display:grid;grid-template-columns:1fr 1fr 160px;gap:16px;}
.ui-resource-card,.ui-contact-card {border:1px solid var(--c-border);background:#fff;border-radius:10px;padding:20px;display:flex;flex-direction:column;align-items:flex-start;gap:12px;}
.ui-resource-card h4 {font-size:16px;font-weight:600;margin:0;}
.ui-resource-card p {font-size:13px;line-height:1.65;color:var(--c-text-2);margin:0;flex:1;}
.ui-contact-card {align-items:center;justify-content:center;text-align:center;}
.ui-contact-card img {width:96px;height:96px;object-fit:contain;}
.ui-contact-card span {font-size:12px;color:var(--c-text-2);}
.ui-about-row {display:flex;align-items:center;justify-content:space-between;gap:16px;border-top:1px solid var(--c-border);padding:16px 0;color:var(--c-text-2);font-size:13px;}
.ui-about-row p {margin:6px 0 0;}
body .main-header.authed {height:56px!important;overflow:visible!important;position:sticky;top:0;z-index:1030;}
body .main-header.authed .logo {width:248px;height:56px;line-height:56px;background:#1a2744;font-size:14px;text-align:left;padding:0 20px;}
body .main-header.authed .navbar {margin-left:248px;min-height:56px;height:56px;background:#fff!important;border-bottom:1px solid var(--c-border);}
body .main-header.authed .navbar .sidebar-toggle {height:56px;padding:18px;color:var(--c-text-2)!important;}
body .main-header.authed .navbar-custom-menu>.navbar-nav {display:flex;height:56px;align-items:center;}
body .main-header.authed .navbar-nav>li {height:auto;}
body .main-header.authed .navbar-nav>li>a {padding:10px 16px;color:var(--c-text)!important;}
body .main-header.authed .navbar-nav>li>a:hover {background:#f5f7fa;}
body .main-header.authed .user-avatar-circle {background:#eef2f8;color:var(--c-primary);}
.ui-breadcrumb {display:flex;align-items:center;gap:8px;height:56px;color:var(--c-text-2);font-size:13px;float:left;max-width:50%;overflow:hidden;white-space:nowrap;}
.ui-breadcrumb strong {font-weight:500;color:var(--c-text);}
body .main-header.authed .status-badge {display:inline-flex;align-items:center;margin:0 12px;min-height:26px;padding:4px 8px;border:1px solid var(--c-border);background:#f5f7fa;color:var(--c-text-2);font-size:12px;line-height:18px;}
body .main-header.authed .status-done {color:#005d4c;background:#eff9f6;border-color:#bcddd4;}
body .main-header.authed .status-running {color:#703d00;background:#fff8ef;border-color:#edceaa;}
body .main-header.authed .status-error {color:#822819;background:#fff4f2;border-color:#edc5bf;}
body .main-sidebar.authed {position:fixed;top:56px;bottom:0;width:248px;height:calc(100dvh - 56px)!important;min-height:0!important;overflow-x:hidden!important;overflow-y:auto!important;background:#1a2744!important;z-index:1020;padding-top:0!important;padding-bottom:24px;}
body .main-sidebar.authed .sidebar {padding-top:8px!important;padding-bottom:0;}
body .main-sidebar.authed .cust-menu {list-style:none;margin:0;padding:4px 0;}
body .main-sidebar.authed .cust-menu li>a {display:flex;align-items:center;gap:8px;padding:10px 16px 10px 40px!important;margin:0!important;color:#e2e8f0;font-size:13px;line-height:20px;border-left:3px solid transparent;}
body .main-sidebar.authed #li-home-fixed>a {padding-left:20px!important;}
body .main-sidebar.authed .cust-menu li.cust-on>a {border-left-color:#a9bde6;background:#2c3d5b;color:#fff;}
body .main-sidebar.authed .cat-header {padding:12px 16px;display:flex;align-items:center;gap:8px;font-size:13px;line-height:20px;color:#e2e8f0;margin:4px 8px;border-radius:6px;}
body .main-sidebar.authed .cat-active {background:#253754;color:#fff;}
body .main-sidebar.authed .cat-count {margin-left:auto;background:rgba(255,255,255,.1);color:#e2e8f0;font-size:11px;}
body .main-sidebar.authed .mod-tabs {padding:8px 12px;gap:4px;}
body .main-sidebar.authed .mod-tab {color:#e2e8f0;font-size:11px;background:transparent;}
body .main-sidebar.authed .mod-tab .fa,body .main-sidebar.authed .mod-tab .fas {font-size:16px;line-height:24px;}
body .main-sidebar.authed .mod-active {background:#344868;color:#fff;}
.ui-nav-group>summary {padding:10px 16px 6px 24px;color:#b9c9e3;font-size:12px;cursor:pointer;}
.ui-nav-search {padding:12px 16px;flex-direction:column;}
.ui-nav-search input {width:100%;border:1px solid #52617a;border-radius:6px;padding:8px;background:#253754;color:#fff;font-size:13px;}
.ui-nav-search input::placeholder {color:#d0daea;}
.ui-nav-search-field {position:relative;width:100%;}
.ui-nav-search-field input {padding-right:34px;min-width:0;box-sizing:border-box;}
.ui-nav-search-field input::-webkit-search-cancel-button {display:none;}
.ui-nav-search-clear {position:absolute;right:5px;top:50%;transform:translateY(-50%);width:28px;height:28px;display:flex;align-items:center;justify-content:center;padding:0;border:0;background:transparent;color:#dce7f7;font-size:22px;line-height:1;cursor:pointer;border-radius:4px;}
.ui-nav-search-clear:hover {background:#344868;}
.ui-nav-search-results {margin-top:8px;width:100%;box-sizing:border-box;background:#253754;border:1px solid #52617a;border-radius:8px;overflow:hidden;color:#f4f7fb;}
.ui-nav-search-status {padding:9px 10px;font-size:12px;line-height:1.6;color:#c3d1e5;overflow-wrap:anywhere;}
#ui-nav-search-list {max-height:min(360px,50vh);overflow-y:auto;overscroll-behavior:contain;}
.ui-nav-search-option {display:block;width:100%;padding:10px;text-align:left;background:transparent;border:0;border-top:1px solid #42516b;color:#fff;cursor:pointer;line-height:1.5;}
.ui-nav-search-option strong,.ui-nav-search-option span {display:block;overflow-wrap:anywhere;}
.ui-nav-search-option strong {font-size:13px;font-weight:600;}
.ui-nav-search-option span {font-size:11px;color:#c3d1e5;margin-top:3px;}
.ui-nav-search-option:hover,.ui-nav-search-option[aria-selected="true"] {background:#3b5276;}
.ui-nav-search :focus-visible {outline:2px solid #c9dffb;outline-offset:2px;}
.ui-nav-search-results[hidden],.ui-nav-search-clear[hidden] {display:none!important;}
#mcmc_settings_table table th,#mcmc_settings_table table td,
#mcmc_heterogeneity_table table th,#mcmc_heterogeneity_table table td {text-align:center!important;vertical-align:middle;}
.mcmc-parameter-guide {margin-top:16px;}
.mcmc-parameter-guide .result-key-value th:first-child,.mcmc-parameter-guide .result-key-value td:first-child {width:34%;}
body .content-wrapper.authed {margin-left:248px!important;}
#ui-sidebar-backdrop {display:none;}
.ui-journal-settings {background:#fff;border:1px solid var(--c-border);border-radius:10px;padding:16px;margin:0 0 16px;}
.ui-journal-settings .js-btn {border:1px solid var(--c-primary)!important;background:#fff!important;color:var(--c-primary)!important;border-radius:6px;padding:8px 12px;font-size:13px;min-height:36px;}
.ui-journal-settings .js-active {background:var(--c-primary)!important;color:#fff!important;}
.ui-palette-label {color:var(--c-text,#26364a);font-size:13px;font-weight:600;margin:12px 0 8px;}
.ui-palette-options {display:flex;gap:8px;flex-wrap:wrap;}
.ui-journal-settings .js-btn {display:inline-flex;align-items:center;gap:8px;}
.ui-palette-swatches {display:inline-flex;overflow:hidden;border-radius:3px;border:1px solid rgba(0,0,0,.15);}
.ui-palette-swatches span {display:block;width:10px;height:16px;}
.ui-palette-source {display:inline-block;font-size:12px;margin-top:10px;}
.ui-author-color-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;padding-top:12px;}
.ui-author-color-grid[hidden] {display:none!important;}
.ui-author-color-grid .shiny-input-container {width:100%!important;margin-bottom:0;}
.ui-journal-settings .js-btn:focus-visible {outline:3px solid #97b8d9;outline-offset:3px;}
@media(max-width:480px) {
  .ui-palette-options {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));}
  .ui-palette-options .js-btn {justify-content:center;min-width:0;}
}
.ui-technical-error {border:1px solid #edc5bf;border-left:3px solid var(--c-danger);padding:16px;background:#fff4f2;color:#822819;font-size:14px;border-radius:6px;}
.ui-technical-error details {margin-top:12px;font-size:12px;}
.ui-technical-error pre {white-space:pre-wrap;}
@media(min-width:1200px) {
  body.sidebar-collapse .main-sidebar.authed {transform:translateX(-248px);}
  body.sidebar-collapse .content-wrapper.authed,body.sidebar-collapse .main-header.authed .navbar {margin-left:0!important;}
  body.sidebar-collapse .main-header.authed .logo {display:none;}
}
@media(min-width:768px) and (max-width:1199px) {
  body .main-sidebar.authed {width:64px;}
  body .content-wrapper.authed,body .main-header.authed .navbar {margin-left:64px!important;}
  body .main-header.authed .logo {width:64px;font-size:0;padding:0;text-align:center;}
  body .main-header.authed .logo:after {content:'霍';font-size:18px;}
  body .main-sidebar.authed .cat-header {justify-content:center;padding:16px 0;}
  body .main-sidebar.authed .cat-header>span:not(.cat-icon),body .main-sidebar.authed .cat-body,
  body .main-sidebar.authed .ui-nav-search {display:none;}
  body .main-sidebar.authed #li-home-fixed>a {padding-left:0!important;justify-content:center;}
  body .main-sidebar.authed #li-home-fixed span {display:none;}
  body.ui-sidebar-expanded .main-sidebar.authed {width:248px;box-shadow:var(--ui-shadow-float);}
  body.ui-sidebar-expanded .main-sidebar.authed .cat-header {justify-content:flex-start;padding:12px 16px;}
  body.ui-sidebar-expanded .main-sidebar.authed .cat-header>span,body.ui-sidebar-expanded .main-sidebar.authed .ui-nav-search {display:flex;}
  body.ui-sidebar-expanded .main-sidebar.authed .cat-body.cat-open {display:block;}
  body.ui-sidebar-expanded .main-sidebar.authed #li-home-fixed>a {padding-left:20px!important;justify-content:flex-start;}
  body.ui-sidebar-expanded .main-sidebar.authed #li-home-fixed span {display:inline;}
  .ui-breadcrumb {max-width:48%;}
  .ui-resource-grid {grid-template-columns:1fr 1fr;}
  .ui-contact-card {grid-column:1/-1;flex-direction:row;padding:12px;}
  .ui-contact-card img {width:64px;height:64px;}
  .ui-welcome {align-items:flex-start;flex-direction:column;gap:16px;}
}
@media(max-width:767px) {
  body .main-header.authed {display:flex!important;height:56px!important;width:100%;}
  body .main-header.authed .logo {display:none;}
  body .main-header.authed .navbar {margin-left:0;width:100%;}
  body .content-wrapper.authed {margin-left:0!important;transform:none!important;width:100%;}
  body .content-wrapper.authed>.content {padding:16px;}
  body .main-sidebar.authed {top:56px;width:248px;transform:translateX(-248px)!important;transition:transform .18s ease-out;}
  body.ui-sidebar-expanded .main-sidebar.authed {transform:translateX(0)!important;}
  body.ui-sidebar-expanded #ui-sidebar-backdrop {display:block;position:fixed;inset:56px 0 0;background:rgba(16,24,40,.35);z-index:1019;border:0;}
  .ui-breadcrumb {max-width:43%;font-size:12px;}
  .ui-breadcrumb .ui-breadcrumb-category {display:none;}
  body .main-header.authed .status-badge {font-size:11px;margin:0 4px;padding:2px 4px;}
  body .main-header.authed .user-header-name {display:none;}
  body .main-header.authed .navbar-nav>li>a {padding:10px 8px;}
  .ui-data-layout {grid-template-columns:1fr;}
  .ui-settings-column {position:static;}
  .ui-settings-card {padding:0;max-height:none;}
  .ui-settings-scroll {overflow:visible;padding:16px;}
  .ui-data-column .col-sm-3 {width:50%;float:left;}
  .ui-data-column .ui-kpi {min-height:100px;padding:12px;}
  .ui-kpi-value {font-size:26px;}
  .ui-workflow-grid {grid-template-columns:1fr;gap:12px;}
  .ui-workflow-card {padding:16px;}
  .ui-workflow-card p {min-height:64px;}
  .ui-recent-grid,.ui-resource-grid {grid-template-columns:1fr;}
  .ui-contact-card {flex-direction:row;padding:12px;}
  .ui-contact-card img {width:64px;height:64px;}
  .ui-welcome {align-items:flex-start;flex-direction:column;padding:20px;gap:16px;}
  .ui-welcome h2 {font-size:22px;}
  .ui-section-heading {align-items:flex-start;flex-direction:column;gap:4px;}
  .ui-page-head {flex-direction:column;gap:12px;}
  .ui-step button {padding:6px;}
  .ui-empty {padding:24px 12px;}
  .ui-export-bar {gap:8px;}
  .ui-export-bar .ui-export-style {margin-left:0;}
  body .content-wrapper.authed .box>.box-body {padding:16px;}
  body .content-wrapper.authed .box>.box-header {padding:12px 16px;}
  body .content-wrapper.authed [style*="display:flex"] {flex-wrap:wrap;}
  body .content-wrapper.authed .plot-dl-panel {max-width:100%;}
  body .content-wrapper.authed .form-control {max-width:100%;}
}
@media(prefers-reduced-motion:reduce) {body .main-sidebar.authed,.ui-workflow-card {transition:none;}}

/* Diagnostic NMA: real task stages, readable summaries and explicit figure access. */
.dta-progress-card{padding:18px 20px;margin:0 0 20px;border:1px solid #dbe5ee;border-radius:14px;background:linear-gradient(115deg,#f6faff,#fff);color:#26394b;min-width:0}
.dta-progress-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.dta-progress-heading strong{font-size:15px}.dta-progress-time{color:#4b647b;font-variant-numeric:tabular-nums;font-size:12px}
.dta-progress-stage{margin:10px 0;overflow-wrap:anywhere}.dta-progress-track{height:7px;overflow:hidden;border-radius:10px;background:#e4edf5}.dta-progress-fill{height:100%;border-radius:10px;background:linear-gradient(90deg,#4979b4,#65aaa9);transition:width .4s ease}
.dta-progress-track.is-indeterminate .dta-progress-fill{width:35%!important;animation:dta-progress-travel 2s ease-in-out infinite}.dta-progress-note{color:#51687c;font-size:12px;margin:9px 0 0;line-height:1.6}.dta-progress-card[data-state="error"]{border-color:#d5a3a3;background:#fffafa}.dta-progress-card[data-state="partial"]{border-color:#dfcba1;background:#fffdfa}
@keyframes dta-progress-travel{0%{transform:translateX(-110%)}100%{transform:translateX(390%)}}
.dta-result-overview{padding:18px 20px;background:white;border:1px solid #dce5ed;border-radius:12px;margin-bottom:18px}.dta-overview-heading{display:flex;align-items:center;gap:12px;justify-content:space-between;flex-wrap:wrap}.dta-overview-heading h3{font-size:18px;margin:0}.dta-quality-pass{font-size:12px;color:#2f6551;background:#f0f7f3;border:1px solid #d4e8de;border-radius:20px;padding:5px 10px}.dta-result-overview>.ui-help{margin:10px 0;color:#4c6174}
.dta-overview-table{width:100%;border-collapse:collapse;min-width:560px;font-size:13px;color:#273b4c}.dta-overview-table th,.dta-overview-table td{padding:11px 12px;text-align:right;border-bottom:1px solid #e4ebf1;white-space:nowrap}.dta-overview-table th:first-child{text-align:left;white-space:normal;min-width:145px}.dta-overview-table td small{display:block;color:#526b7f;font-size:12px;margin-top:3px;font-variant-numeric:tabular-nums}.dta-overview-table thead th{font-weight:600;color:#52687a}.dta-ranking-detail{margin-top:14px}
.ui-figure-enlarge{min-height:36px;margin-right:4px}.ui-figure-view-tools{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}.ui-figure-view-tools .btn:last-child{margin-left:auto}.ui-figure-lightbox-scroll.is-fit img{max-width:100%;height:auto;max-height:calc(100vh - 160px);object-fit:contain}.dta-palette-close{display:block;margin:0 0 10px auto}.dta-palette-toggle{white-space:nowrap}.nm-analysis-status{padding:12px 14px;border:1px solid #dce6ef;border-radius:9px;margin:12px 0;color:#3c566c;line-height:1.7}.nm-analysis-status ul{padding-left:20px;margin-bottom:0}
@media(max-width:767px){.dta-progress-card,.dta-result-overview{padding:15px}.ui-figure-enlarge,.ui-figure-view-tools .btn,.dta-palette-toggle,.dta-palette-close{min-height:44px}.ui-figure-card>.box-header{display:flex;align-items:center;flex-wrap:wrap;gap:4px}.ui-figure-card>.box-header>.box-title{flex:1;min-width:150px}.dta-overview-heading h3{font-size:17px}}
@media(prefers-reduced-motion:reduce){.dta-progress-track.is-indeterminate .dta-progress-fill{animation:none;transform:none;width:100%!important;opacity:.65}.dta-progress-fill{transition:none}}

/* Keep short control values and complete download labels readable at every width. */
.ui-color-field {display:flex;align-items:center;gap:8px;max-width:100%;}
.ui-color-field>.shiny-input-container {margin-bottom:0;flex:0 0 112px;}
.ui-color-field>input[type="color"] {flex:0 0 34px;height:36px!important;}
body .content-wrapper.authed .colourpicker-input {padding-left:6px;padding-right:6px;}
body .content-wrapper.authed [style*="grid-template-columns:repeat(4,1fr)"]:has(.shiny-colour-input) {grid-template-columns:repeat(auto-fit,minmax(min(100%,144px),1fr))!important;}
.prisma-action-row {display:flex;flex-wrap:wrap;gap:8px;margin-top:10px;align-items:stretch;}
body .content-wrapper.authed .prisma-action-row>.btn {flex:1 1 auto;width:auto;margin:0;display:inline-flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap;transform:none;}
.ui-parameter-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(100px,1fr));gap:8px;margin-top:4px;}
.ui-settings-grid>.shiny-input-container:has(#n_seed) {grid-column:1/-1;}
.nm-control-grid>.shiny-input-container:has(input[id$="_outcome"],input[id$="_reference"]) {grid-column:1/-1;}
.dtam-grade-viewport:has(.ui-figure-empty)>div {min-width:0!important;}
/* Button groups wrap complete controls instead of squeezing their labels. */
body .content-wrapper.authed a.shiny-download-link {display:inline-flex;align-items:center;justify-content:center;gap:6px;flex:0 0 auto!important;width:auto;max-width:100%;}
body .content-wrapper.authed :is(div[style*="display:flex"],div[style*="display: flex"]):has(>a.shiny-download-link) {flex-wrap:wrap;align-items:center;}
/* Settings sidebars need room for complete control values on tablets. */
@media(max-width:1199px) {
  body .content-wrapper.authed .row:has(>.col-sm-3):has(>.col-sm-9)>:is(.col-sm-3,.col-sm-9),
  body .content-wrapper.authed .row:has(>.col-sm-4):has(>.col-sm-8)>:is(.col-sm-4,.col-sm-8),
  body .content-wrapper.authed .row:has(>.col-sm-5):has(>.col-sm-7)>:is(.col-sm-5,.col-sm-7) {float:none;width:100%;}
}
