.portal-tool-page { background: #f6f9fc !important; background-image: none !important; }
.portal-tool-page main { background: transparent; padding-top: 0; }
.portal-tool-page .tool-heading { background: transparent; }
.portal-tool-page .portal-tool-title-logo { width: 56px; height: 56px; object-fit: contain; }
.tool-heading h1 { overflow-wrap: anywhere; }
.portal-tool-page .navbar-brand span { white-space: normal; font-size: 1rem; }
.portal-tool-page .card-header { background: #e7f1ff; color: #084298; font-weight: 600; }
.portal-tool-page .tool-report-actions { padding-top: 1rem; border-top: 1px solid #ced4da; }
.tool-report-actions .btn { min-height: 42px; }
.portal-report-capture .tab-pane { display: block !important; opacity: 1 !important; }
.portal-report-capture .card { box-shadow: none !important; margin-bottom: 16px; break-inside: avoid; }
.portal-report-capture pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 14px Arial; }
.stats-module[data-analysis-mode="treatment"] .diagnostic-metric { display: none !important; }
.stats-module[data-analysis-mode="diagnostic"] #bayesContent,
.stats-module[data-analysis-mode="diagnostic"] #fragility,
.stats-module[data-analysis-mode="diagnostic"] #trialLrCard { display: none !important; }
.stats-module .nomogram circle { cursor: grab; touch-action: none; }
.stats-module .nomogram circle:focus { stroke: #dc3545; stroke-width: 4px; outline: none; }
.stats-module .metric-spark svg { width: 100%; max-width: 100%; height: 38px; }
@media (max-width: 575.98px) {
  .portal-tool-page .tool-heading { padding-top: 1rem !important; }
  .portal-tool-page .portal-tool-title-logo { width: 40px; height: 40px; }
  .tool-heading h1 { font-size: 1.3rem; }
  .portal-tool-page .card-body { padding: 1rem; }
  .portal-tool-page .input-group { flex-wrap: wrap; }
  .portal-tool-page .badge { white-space: normal; }
}

.stats-module[data-analysis-mode="diagnostic"] .treatment-metric,
.stats-module[data-analysis-mode="diagnostic"] .bayesian-column,
.stats-module[data-analysis-mode="diagnostic"] .fragility-section { display: none !important; }
.stats-module[data-analysis-mode="diagnostic"] .frequentist-column { width: 100%; }
.portal-tool-page .offcanvas { max-width: 100vw; }

.stats-module .nomogram-wrap { overflow-x: auto; }
.stats-module .nomogram { min-width: 620px; }

.stats-module[data-analysis-mode="diagnostic"] .treatment-input { display: none !important; }
.stats-module[data-analysis-mode="diagnostic"] .study-input-column { width: 100%; }
