/* Shared type scale. Important sizes also cover module styles injected after page load. */
:root {
  --font-page: 24px;
  --font-section: 18px;
  --font-card: 16px;
  --font-body: 14px;
  --font-help: 13px;
  --font-label: 12px;
  --font-metric: 28px;
}
body { font-size: var(--font-body); line-height: 1.6; }
body :is(h1, .plugin-title h1, .plugin-title h2, .target-title) {
  font-size: var(--font-page) !important; line-height: 1.35;
}
body h2 { font-size: var(--font-section) !important; line-height: 1.4; }
body :is(h3, h4, .rw-workspace > strong, .structure-result strong, .review-name) {
  font-size: var(--font-card) !important; line-height: 1.5;
}
body :is(p, li, dt, dd, label, legend, summary, table, th, td) {
  font-size: var(--font-body) !important;
}
body :is(input:not([type=checkbox]):not([type=radio]), select, textarea, .input,
  .btn, .btn.small, .text-link, .project-delete-button, .tool-open,
  .tabs button, .input-tabs button, .scope-switch button, .wizard-steps button,
  .plugin-tabs a, .plugin-tabs button, .rw-project-tabs a, .rw-filters a,
  .task-menu button, .task-menu summary, .assistant-mode-switch button,
  .research-qa-new, .research-qa-head-new, .research-qa-head-config,
  .research-qa-prompt, .research-qa-cancel) {
  font-size: var(--font-body) !important;
}
body :is(input:not([type=checkbox]):not([type=radio]), select, textarea, .input) {
  line-height: 1.5;
}
body :is(.sidebar nav a, .sidebar nav a span:not(.nav-symbol), .breadcrumb,
  .research-switch strong, .workspace-switch strong, .account-button,
  .plugin-navigation strong, .library-details strong, .source-card strong,
  .target-structure-heading strong, .target-optional-details > summary strong,
  .target-new-project strong, .target-manager-empty strong,
  .solid-analysis strong, .capability-summary strong, .software-io dd,
  .status-line, .review-list > div, .review-output, .research-qa-answer-text,
  .research-qa-chat-head strong, .research-qa-brand strong,
  .bio .bio-flow span, .chain-chip strong) {
  font-size: var(--font-body) !important;
}
body :is(small, .subtitle, .cell-sub, .form-context, .compact-form-note,
  .stat-note, .stat-label, .target-sub, .progress-meta, .table-footer,
  .tool-engine, .section-count, .tool-count, .project-kind,
  .workflow-steps, .workflow-bottom, .pipeline-mini, .pipeline-save > span,
  .pipeline-step-info small, .pipeline-step-info p, .task-management-toolbar > span,
  .discovery-target span, .discovery-check, .discovery-counts,
  .assistant-meta, .assistant-evidence, .assistant-location,
  .assistant-context span, .assistant-history-row span, .api-token-row small,
  .field small, .plugin-field small, .target-form-hero p, .target-manager-intro,
  .target-structure-heading span:not(.target-optional-badge), .target-structure-status,
  .target-file-pick > span, .target-optional-details > summary small,
  .target-manager-empty p, .target-example, .target-pdb-input > span,
  .automatic-steps, .automatic-steps span, .software-io dt, .capability-summary span,
  .solid-flow-step p, .solid-flow-engine, .bio .bio-caption, .modality-note,
  .rw-details dt, .rw-stage p, .rw-stage-number, .rw-workspace p,
  .rw-project-card p, .rw-next p, .rw-open, .rw-back,
  .rw-card-top small, .rw-metrics span, .rw-stage-banner span,
  .research-switch small, .workspace-switch small, .library-details small,
  .source-card small, .source-card span:not(.library-symbol),
  .account-section-head span, .quota-grid span, .usage-line,
  .research-qa-history-empty, .research-qa-history-main strong,
  .research-qa-history-main > span, .research-qa-chat-head span,
  .research-qa-message > span, .research-qa-answer-head > span,
  .research-qa-answer-head small, .research-qa-composer-foot,
  .rq-provider-status p, .rq-provider-privacy p, .rq-provider-dialog .field small,
  .drawing-status, .drawing-footer span, .site-footer) {
  font-size: var(--font-help) !important;
}
body :is(.tag, .local-badge, .badge-number, .field-required, .target-optional-badge,
  .nav-section-label, .nav-label, .section-eyebrow, .target-form-kicker,
  .unified-project-card .project-type, .task-inherited-label,
  .research-qa-history-label, .research-qa-state, .research-qa-brand small,
  .chain-chip) {
  font-size: var(--font-label) !important;
}
body :is(.stat-value, .rw-metrics strong, .bio .bio-metrics strong, .bio-cohort-summary strong) {
  font-size: var(--font-metric) !important; line-height: 1.25;
}
body :is(pre, code, .code-text, .integration-json, .integration-log,
  .sequence-summary, .plugin-sequence, .solid-smiles, .modality-sequence,
  .plugin-molecule span) {
  font-size: var(--font-help) !important; line-height: 1.7 !important;
}
/* Keep compact controls readable when labels wrap; glyph buttons keep their icon sizing. */
body :is(.btn, .scope-switch button, .input-tabs button, .wizard-steps button) {
  line-height: 1.45;
}
.research-qa-select-pill { height: auto; min-height: 34px; }
.research-qa-select-pill select { min-height: 30px; }
.research-qa-head-config::first-letter { font-size: inherit; }
.research-qa-chat-head { min-height: 60px; height: auto; }
@media(max-width:700px) {
  .research-qa-head-actions { flex-wrap: wrap; justify-content: flex-end; }
  .rw-stage-banner { overflow-wrap: anywhere; }
}
