/* Workspace type roles. Keep visual surfaces and layout in the component stylesheets. */
body { font-family: var(--font); }
button, input, select, textarea { font-family: var(--font); }
code, pre, kbd, samp { font-family: var(--mono); }

.studio-page-head h2,
.studio-work-heading h2,
#studio-overview .overview-page-head h2,
#query-library-title,
#dashboard-title,
#studio-er-title { font: 700 var(--type-page) var(--font); }

.studio-section-title h3,
.overview-board h3,
.learning-section-title,
.learning-next h3,
.studio-atlas-section-title h3,
.bp-section h3,
.project-workbench h3,
.sql-diagnostics h3,
#studio-atlas-list-title { font: 700 var(--type-section) var(--font); }

#overview-task-title,
.studio-preview h3,
.bp-hero h3,
.sandbox-source h3,
.dark-workbench #work-layout #task-title { font: 700 var(--type-task-title) var(--font); }

.dark-workbench #work-layout #task-desc,
#task-desc,
.bp-question,
.bp-step-condition > p:first-of-type,
.sql-diagnostics .diagnostics-task-body > p { font: var(--type-task) var(--font); }

.overview-note,
.overview-continuations small,
.overview-evidence-line p,
.studio-preview p,
.studio-atlas-heading p,
.studio-atlas-preview-copy p,
.learning-chapter-guide p,
.bp-context p,
.sandbox-source p,
.sql-diagnostics p,
.dark-workbench #work-layout .feedback p { font: var(--type-note) var(--font); }

.engine-state,
.metric small,
.overview-metrics dt,
.overview-metrics dd + dd,
.overview-check-profile small,
.overview-row small,
.overview-calendar-caption,
.studio-catalog-count,
.studio-atlas-count,
.studio-atlas-row-copy small,
.site-footer-meta,
.diagnostics-task-score { font: var(--type-meta) var(--font); }

#catalog-search,
#catalog-level,
#catalog-more-topics,
#studio-atlas-search,
#query-library-search,
.studio-catalog-search :is(input, select),
.studio-statuses button,
.studio-topic-quick button,
.result-grid-input,
.chart-builder select,
.sql-diagnostics-controls :is(select,input[type="number"]),
.bp-label select { font: var(--type-filter) var(--font); }

body .rail-link,
body :is(.button-primary,.button-secondary,.button-outline,.button-ghost),
.studio-rail-toggle,
.overview-card-action,
.overview-section .link-btn,
#overview-task-open,
#work-layout .result-tab,
#work-layout .run-actions button,
.practice-workspace #work-layout #query-run-actions button,
.practice-workspace #work-layout #query-tools-pop button:not([hidden],.workbench-sandbox-only),
#practice-hint > summary,
.dark-workbench #work-layout .task-bottom button,
.sql-diagnostics .diagnostics-button,
.bp-button,
.discovery-learning-tools .learning-chapter-btn,
.discovery-learning-tools .learning-skill-item button { font-size: 14px; line-height: 1.45; }

.studio-task-name strong { font: 400 15px/1.5 var(--font); }
.studio-task-topic,
.studio-task-level { font: 13px/1.5 var(--font); }
.studio-task-number { font: 13px/1.5 var(--mono); }

.data-table,
:is(#work-layout,#project-workbench) .data-table,
.xr-table,
.bp-metric-values { font: var(--type-control) var(--font); }

.data-table th,
.data-table .result-grid-sort,
:is(#work-layout,#project-workbench) .data-table th button {
 font: 700 var(--type-control) var(--font);
}
:is(#work-layout,#project-workbench) .data-table :is(th,td) { line-height: 1.45; }

.studio-atlas-row-index,
.studio-atlas-row-count,
.studio-atlas-meta,
.diagnostics-task-index,
#work-layout .panel-desc,
.studio-er-field small,
.studio-er-keys,
.studio-er-details li { font: var(--type-technical) var(--mono); }

.studio-er-field code,
.studio-er-field-list,
.studio-er-card > button strong,
.studio-er-overview .studio-er-card > button strong { font: var(--type-er) var(--mono); }
.studio-er-card > button strong, .studio-er-keys { font-weight: 600; }
/* A column may be both a primary and a foreign key. Keep both within the row. */
.studio-er-keys:has(> :nth-child(2)) { font-size: 10px; line-height: 1.1; }

.xr-controls textarea,
.studio-atlas-example pre { font: var(--type-sql) var(--mono); }

.overview-sql,
.overview-check-score,
.result-grid-count,
.analytics-tooltip span,
.sql-diagnostics [role="timer"] { font: var(--type-technical) var(--mono); }

.overview-metrics dd:not(:last-child),
#overview-trend .overview-trend-summary strong,
.metric strong,
.diagnostics-summary dd { font: 600 var(--type-kpi) var(--mono); }
.chart-kpi-number { line-height: 1.05; }

@media (max-width: 520px) {
 /* Long Cyrillic headings may wrap without widening the page. */
 .studio-page-head h2,
 #studio-overview .overview-page-head h2 { overflow-wrap: anywhere; }
}

@media (max-width: 360px) {
 .practice-workspace .masthead { padding-inline: 8px; gap: 4px; }
}
