/* Shared type roles, loaded after page styles to normalize the legacy UI. */
:root {
  --font-ui: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --text-caption: .75rem;
  --text-secondary: .875rem;
  --text-body: 1rem;
  --text-subheading: 1.125rem;
  --text-section: 1.25rem;
  --text-page: 1.75rem;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-heading: 600;
  --report-leading: 1.85;
}

body {
  font-family: var(--font-ui);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  letter-spacing: 0;
}

button, input, select, textarea {
  font-family: var(--font-ui);
  letter-spacing: 0;
}

h1, h2, h3, h4, strong, b {
  font-weight: var(--weight-heading);
  letter-spacing: 0;
}

.workbench-page .workbench-title-block h1,
.workbench-page .opportunity-hero h1 {
  font-size: var(--text-page);
  font-weight: var(--weight-heading);
  line-height: 1.4;
  letter-spacing: 0;
}

.workbench-page .section-heading h2,
.workbench-page .area-head h2,
.settings-page .notification-card-header h2,
.settings-page .users-section-head h2 {
  font-size: var(--text-section);
  font-weight: var(--weight-heading);
  line-height: 1.5;
  letter-spacing: 0;
}

.workbench-page .lead-card h3,
.workbench-page .opportunity-card h3,
.workbench-page .brief-facts h3,
.workbench-page .brief-questions h3,
.workbench-page .brief-review h3,
.workbench-page .visit-session-head h3 {
  font-size: var(--text-subheading);
  font-weight: var(--weight-heading);
  line-height: 1.5;
  letter-spacing: 0;
}

.workbench-page .user-menu > span {
  font-size: var(--text-secondary);
  font-weight: var(--weight-regular);
  line-height: 1.5;
}

.workbench-page .research-form label,
.workbench-page .owner-transfer-form label,
.settings-page .notification-form label,
.login-page .login-form label {
  font-size: var(--text-secondary);
  font-weight: var(--weight-medium);
  letter-spacing: 0;
}

.workbench-page .research-form :is(input, select, textarea),
.workbench-page .owner-transfer-form select,
.settings-page .user-name input,
.settings-page .notification-form textarea,
.login-page .login-form input {
  font-family: var(--font-ui);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: 1.6;
  letter-spacing: 0;
}

.btn-primary, .btn-secondary, .btn-ghost,
.workbench-page .research-form button,
.workbench-page .lead-card button,
.workbench-page .opportunity-action-button,
.workbench-page .diagnose-btn,
.editor-page .ai-button,
.editor-page .editor-save-row button,
.settings-page .user-save,
.settings-page .notification-form button,
.login-page .login-form button {
  font-family: var(--font-ui);
  font-size: var(--text-secondary);
  font-weight: var(--weight-heading);
  line-height: 1.4;
  letter-spacing: 0;
}

.btn-secondary, .btn-ghost,
.workbench-page .user-menu button,
.workbench-page .workbench-action-link,
.workbench-page .opportunity-filter a {
  font-family: var(--font-ui);
  font-size: var(--text-secondary);
  font-weight: var(--weight-medium);
  letter-spacing: 0;
}

.workbench-page .opportunity-filter a.is-active,
.project-navigation-links a[aria-current=page] {
  font-weight: var(--weight-heading);
}

.workbench-page .opportunity-card small,
.workbench-page .stage-badge,
.workbench-page .lead-card .lead-status,
.workbench-page .opportunity-hero .opp-code,
.workbench-page .opportunity-hero .stage-badge,
.workbench-page .opportunity-hero .next-action-card .na-label,
.workbench-page .opportunity-hero .next-action-card .na-text,
.workbench-page .opportunity-hero .hero-contact b {
  font-family: var(--font-ui);
  font-weight: var(--weight-medium);
  letter-spacing: 0;
}

.workbench-page .workbench-brand-lockup span,
.workbench-page .section-heading span,
.workbench-page .visit-session-head span,
.editor-page .editor-brand-lockup span,
.editor-page .sidebar-kicker,
.editor-page .editor-section-head span,
.editor-page .preview-eyebrow,
.report-page .report-brand-lockup span,
.login-page .login-brand span,
.login-page .eyebrow {
  font-family: var(--font-ui);
  font-weight: var(--weight-medium);
  letter-spacing: 0;
}

.workbench-page .empty b,
.workbench-page .area-head > span,
.workbench-page .visit-add-panel summary > span,
.workbench-page .visit-session-card summary > span,
.workbench-page .result-item .result-head h3,
.workbench-page .result-item .result-recommend,
.workbench-page .result-item.level-high .result-recommend,
.workbench-page .result-item.level-mid .result-recommend {
  font-weight: var(--weight-heading);
  letter-spacing: 0;
}
.workbench-page .result-level,
.workbench-page .result-item .recommend-label {
  font-family: var(--font-ui);
  font-size: var(--text-caption);
  font-weight: var(--weight-medium);
  letter-spacing: 0;
}
.workbench-page .result-item p { font-size: var(--text-body); }

.workbench-page .opportunity-card-actions button,
.workbench-page .lead-card-actions button,
.workbench-page .opportunity-delete-menu > summary,
.workbench-page .opportunity-delete-menu[open] form button,
.workbench-page .danger-warn,
.workbench-page .text-action,
.editor-page .editor-actions a,
.report-page .report-nav-actions a,
.login-page .login-back-link {
  font-family: var(--font-ui);
  font-size: var(--text-secondary);
  font-weight: var(--weight-medium);
  letter-spacing: 0;
}
.report-page .report-nav-actions button {
  font-family: var(--font-ui);
  font-size: var(--text-secondary);
  font-weight: var(--weight-heading);
  line-height: 1.4;
  letter-spacing: 0;
}

.workbench-page .field-group-legend,
.workbench-page .field-group-legend i {
  font-family: var(--font-ui);
  font-size: var(--text-secondary);
  font-weight: var(--weight-heading);
  letter-spacing: 0;
}

.workbench-page .field-group-legend small,
.workbench-page .brief-eyebrow {
  font-size: var(--text-caption);
  font-weight: var(--weight-regular);
  letter-spacing: 0;
}

.workbench-page .brief-facts dd,
.workbench-page .brief-questions li,
.workbench-page .brief-history p {
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: 1.8;
}

.editor-page .editor-section-head h1,
.activity-page .activity-heading h1,
.settings-page .settings-header h1 {
  font-size: 1.5rem;
  font-weight: var(--weight-heading);
  line-height: 1.5;
  letter-spacing: 0;
}

.editor-page .editor-nav b {
  font-size: var(--text-secondary);
  font-weight: var(--weight-medium);
}
.editor-page .editor-nav.active b { font-weight: var(--weight-heading); }
.editor-page .preview-heading { font-size: var(--text-secondary); font-weight: var(--weight-heading); }
.editor-page .preview-heading small { font-weight: var(--weight-regular); }
.editor-page .preview-paper h2 { font-size: var(--text-section); line-height: 1.5; letter-spacing: 0; }
.editor-page .preview-meta dt { font-size: var(--text-caption); font-weight: var(--weight-regular); letter-spacing: 0; }
.editor-page .preview-meta dd { font-size: var(--text-secondary); font-weight: var(--weight-medium); }
.editor-page .editor-form textarea,
.editor-page .preview-body {
  font-family: var(--font-ui);
  font-size: var(--text-body);
  font-weight: var(--weight-regular);
  line-height: var(--report-leading);
  letter-spacing: 0;
  overflow-wrap: anywhere;
}
.editor-page .trace-box pre { font-size: var(--text-caption); line-height: 1.8; }

.light-intake { font-family: var(--font-ui); }
.light-intake .intake-intro h1 { font-size: 2.25rem; font-weight: var(--weight-heading); line-height: 1.45; letter-spacing: 0; }
.light-intake .entry-primary strong { font-size: 1.5rem; line-height: 1.5; }
.light-intake .entry-secondary strong { font-size: var(--text-subheading); line-height: 1.5; }
.light-intake :is(.step-panel, .cover) h2 { font-weight: var(--weight-heading); letter-spacing: 0; }
.login-page .login-intro h1 { font-size: 2.5rem; font-weight: var(--weight-heading); line-height: 1.4; letter-spacing: 0; }
.login-page .login-card-head h2 { font-size: 1.5rem; font-weight: var(--weight-heading); line-height: 1.5; letter-spacing: 0; }

@media screen and (max-width: 700px) {
  .workbench-page .workbench-title-block h1,
  .workbench-page .opportunity-hero h1,
  .editor-page .editor-section-head h1,
  .activity-page .activity-heading h1,
  .settings-page .settings-header h1 { font-size: 1.375rem; }
  .light-intake .intake-intro h1 { font-size: 1.75rem; }
  .light-intake .entry-primary strong { font-size: 1.375rem; }
  .login-page .login-intro h1 { font-size: 2rem; }
}
