/* AI4Sport typography system · shared by every role and workspace. */
:root {
  --type-micro: 12px;
  --type-caption: 12px;
  --type-compact: 13px;
  --type-body: 14px;
  --type-emphasis: 15px;
  --type-card-title: 18px;
  --type-section-title: 28px;
  --type-page-title: 34px;
}

body {
  font-size: 15px;
  line-height: 1.55;
}

/* Caption text has one shared floor across coach, player and admin pages. */
body.app-page small,
body.auth-page small {
  font-size: var(--type-caption) !important;
  line-height: 1.45;
}

body.auth-page .brand-mark {
  font-size: var(--type-micro) !important;
}

/* Micro labels are reserved for indexes, badges and uppercase system markers. */
body.app-page :is(
  .brand-mark,
  .sidebar-label,
  .nav-group-label,
  .team-avatar,
  .nav-badge,
  .topbar-kicker,
  .coach-page-badge,
  .toolbar-kicker,
  .coach-task-code,
  .coach-mini-avatar,
  .coach-role-chip,
  .coach-topic-label,
  .template-code,
  .role-chip,
  .chart-status,
  .radar-center-label,
  .radar-center-label strong,
  .player-signal-index,
  .player-task-index,
  .knowledge-card-index,
  .admin-radar-label,
  .admin-activity-time,
  .section-count,
  .catalog-status,
  .status-chip,
  .ai-badge,
  .match-column-heading > span,
  .match-plan-title > span,
  .match-plan-step > i,
  .tv-status-content > header > span,
  .coach-knowledge-skill footer strong
) {
  font-size: var(--type-micro) !important;
}

/* Repeated controls and field labels use the same compact scale. */
body.app-page :is(
  .coach-filter-field input,
  .coach-filter-select,
  .match-field > span:first-child,
  .match-range-fields label > span,
  .match-prompt-field > span,
  .match-task-name-field > span,
  .match-task-name-field input,
  .match-run-actions .button,
  .tv-select-field > span:first-child,
  .tv-select-field select,
  .tv-head-actions button,
  .tv-control-row button,
  .tv-action-grid button
) {
  font-size: var(--type-compact) !important;
}

/* Equivalent module headings should read as the same hierarchy. */
body.app-page :is(
  .match-column-heading strong,
  .match-plan-title strong,
  .tv-section-title span,
  .coach-toolbar-summary strong
) {
  font-size: var(--type-body) !important;
}

body.app-page :is(
  .coach-knowledge-skill h4,
  .coach-knowledge-topic h4,
  .tv-source-title strong,
  .match-disclosure > summary strong
) {
  font-size: var(--type-card-title) !important;
}

body.app-page .coach-subpage-heading h3 {
  font-size: var(--type-section-title) !important;
}

body.app-page .topbar h1 {
  font-size: clamp(29px, 2.1vw, var(--type-page-title)) !important;
}

/* Dense data labels previously dropped below the readable floor. */
body.app-page :is(
  .admin-table thead th,
  .admin-table td::before,
  .coach-task-assignee span,
  .coach-task-signal span,
  .coach-player-progress span,
  .coach-player-meta,
  .coach-player-card footer,
  .coach-knowledge-summary span:not(.coach-knowledge-stat-icon),
  .coach-knowledge-skill footer,
  .player-task-summary span,
  .progress-trend-bar b,
  .progress-trend-card footer,
  .catalog-stat-grid small,
  .workspace-selects small,
  .ui-select-value small,
  .ui-select-option small,
  .ui-select-option > i
) {
  font-size: var(--type-micro) !important;
}

body.app-page :is(
  .metric-meta span,
  .admin-health-row .health-value
) {
  font-size: var(--type-micro) !important;
}

/* Keep every compact, user-facing label at the shared 12px readability floor. */
body.app-page :is(
  .visual-node,
  .visual-caption,
  .metric-meta,
  .metric-live,
  #tracking-review-version,
  #tracking-review-meta,
  .tracking-review-section-title > span,
  #tracking-propagation-preview,
  .table-action,
  .match-video-ai-option em,
  .match-preview-placeholder p,
  .match-loading-orbit span,
  .match-block-state,
  .match-replay-progress span,
  .match-tactical-hud span,
  .match-tactical-caption span,
  .match-view-tabs button,
  .match-cache-summary,
  #tv-workspace-badge,
  .tv-collapsed-possession i,
  .tv-formation-grid span,
  .tv-possession-start button,
  .tv-compare-summary p,
  .tv-compare-clear,
  .match-chat-suggestions button
) {
  font-size: var(--type-micro) !important;
}
