/* Shared typography, approved 07.11.2026. Loaded after all component styles.
   Important declarations reconcile the older prototype's responsive overrides.
   Keep icon sizes separate from text sizes. New screens should use these tokens
   and semantic headings, or the type-* role classes below. */
:root {
  --font-body: 13px;
  --font-meta: 12px;
  --font-field: 16px;
  --font-tile: 15px;
  --font-group: 16px;
  --font-dialog: 20px;
  --font-page: 24px;
  --font-result: 24px;
  --line-body: 1.45;
  --line-control: 1.3;
  --line-heading: 1.25;
}

body {
  font-family: Helvetica, Arial, sans-serif;
  font-size: var(--font-body);
  line-height: var(--line-body);
}

/* Ordinary content, form labels, fields and explanatory text. */
body :is(p, label, input, select, textarea, table, td, th, summary, li, pre,
  .field, .name, .page-row, .page-check, .pair, .production, .notice,
  .section-note, .pd-help, .pd-error, .error, .toast, .context-rule,
  .related-production, .setting-line, .source-note, .source-utility,
  .v2-heading > span, .v2-output, .v2-price-selects span, .v2-run-pill > span,
  .v2-admin-row strong, .v2-summary > div, .admin-empty, .admin-note,
  .admin-records, .general-inline-example strong, .general-inline-example span,
  .admin-format-preview strong, .admin-format-preview span,
  .v2-rule-preview p, .v2-rule-preview span, .price-rule-example span,
  .user-access-summary > strong, .v2-card-prices span,
  .import-stats span, .import-reason, .import-note, .import-footer-hint,
  .import-detail-note, .type-body) {
  font-size: var(--font-body) !important;
  line-height: var(--line-body) !important;
}
body :is(p, label, input, select, textarea, .field, .type-body) {
  font-weight: 400 !important;
}
/* Card values are 16 px; their labels and toolbar filters remain 13 px.
   Include the existing important price-input shorthand in this override. */
body dialog :is(input:not([type=checkbox]):not([type=radio]), select, textarea),
body .drawer :is(input:not([type=checkbox]):not([type=radio]), select, textarea),
body .v2-admin-content .field :is(input:not([type=checkbox]):not([type=radio]), select, textarea),
#pageDialog.v2-price-type-card .field input,
#pageDialog.v2-price-type-card .field select {
  font-size: var(--font-field) !important;
  font-weight: 400 !important;
}
#pageDialog.import-dialog .import-detail-note,
#pageDialog .type-filter {
  font-size: var(--font-body) !important;
}

/* Controls and navigation remain readable at every screen width. */
body :is(button, .button, .navitem, .tab, .step, .filterbutton, .page-select,
  .acceptbtn, .choice-label, .basis-control, .header-pill, .type-control),
.sidebar .sidebar-dark .navitem,
.v2-panel .expand-control {
  font-size: var(--font-body) !important;
  font-weight: 500 !important;
  line-height: var(--line-control) !important;
}
body :is(input, select, textarea, table, td, th) {
  line-height: var(--line-control) !important;
}
body :is(th, .group-title, .column-label) { font-weight: 600 !important; }
body :is(.group-title, .column-label, .cell-value, .section-number,
  .source-line strong, .page-drop strong, .linked-product strong,
  .account, .account-name, .user-name) { font-size: var(--font-body) !important; }
input[type=file]::file-selector-button {
  font-size: var(--font-body) !important;
  font-weight: 500 !important;
  line-height: var(--line-control) !important;
}
input[type=file]::-webkit-file-upload-button {
  font-size: var(--font-body) !important;
  font-weight: 500 !important;
  line-height: var(--line-control) !important;
}

/* Metadata only: dates, versions, statuses and secondary captions. */
body :is(small, .meta, .eyebrow, .tag, .count, .table-counter, .category-count,
  .section-badge, .user-status, .approved, .reviewstatus, .footer, .legend,
  .crumb, .demo, .micro, .brand-note, .workspace-label, .workspace-foot,
  .v2-tile-label, .v2-tile-tags span, .workflow-status, .modehint,
  .sku-footer-summary, .sku-preview-note, .release-footer, .type-meta) {
  font-size: var(--font-meta) !important;
  line-height: var(--line-body) !important;
}

/* Group headings, including the blue table and settings section bars. */
body :is(h3, h4, .sectionlabel, .pd-section, .navlabel,
  .table-title h2, .page-card h2, .settings-list h2, .preparation-context h2,
  .source-status h2, .new-product-empty h2, .user-rights-group legend,
  .type-group-title),
.v2-panel > .table-title h2 {
  font-size: var(--font-group) !important;
  font-weight: 600 !important;
  line-height: var(--line-heading) !important;
}

/* Tile titles are distinct from the title of an open card. */
body :is(.v2-price-tile header strong, .v2-price-tile h3,
  .current-run strong, .import-product-name, .type-tile-title) {
  font-size: var(--font-tile) !important;
  font-weight: 600 !important;
  line-height: var(--line-heading) !important;
}

/* Main sections and subsections both use 24 px. */
body :is(h1, .v2-admin-content > h2, .admin-page-heading h2,
  .v2-model-heading h2, .type-page-title) {
  font-size: var(--font-page) !important;
  font-weight: 600 !important;
  line-height: var(--line-heading) !important;
}

/* All modal titles, including imports, confirmations and error messages. */
body :is(dialog h2, .drawerhead h2, .modal h2, #settings h2,
  .type-dialog-title) {
  font-size: var(--font-dialog) !important;
  font-weight: 600 !important;
  line-height: var(--line-heading) !important;
}

/* Key calculation results; ordinary table values stay at 13 px. */
body :is(.v2-card-prices strong, .v2-decision-income strong,
  .v2-summary strong, .big-number, .metric strong, .analytic-item strong,
  .pd-summary strong, .sku-price-grid strong, .total strong, .miniprice strong,
  .income-hero > strong, #decisionIncome, #decisionIncomeRub,
  #skuIncome, #skuIncomeRub, .settings-price strong, .settings-income strong,
  .v2-rule-preview > strong, .price-rule-example strong, .import-stats strong,
  .table-total, .type-result) {
  font-size: var(--font-result) !important;
  font-weight: 600 !important;
  line-height: var(--line-heading) !important;
}

/* Entry screens share the same hierarchy as the workspace. */
#alpha-sign-in :is(.al-intro, .al-form-intro, .al-client-purpose,
  .al-login-invitation, .al-invitation-first, .al-invitation-second,
  .al-stage, .al-stage-number, .al-label, .al-help, .al-help strong,
  .al-status, .v2-auth-note) {
  font-size: var(--font-body) !important;
  line-height: var(--line-body) !important;
}
#alpha-sign-in :is(h2, .al-form-side h3) {
  font-size: var(--font-page) !important;
  font-weight: 600 !important;
  line-height: var(--line-heading) !important;
}
#alpha-sign-in :is(.al-client-name, .al-company) {
  font-size: var(--font-group) !important;
  font-weight: 600 !important;
}
#alpha-sign-in :is(.al-bottom, .al-kicker) {
  font-size: var(--font-meta) !important;
  line-height: var(--line-body) !important;
}

/* Symbol-only controls are icons, not text. Do not shrink them to 13 px. */
body :is(.pd-close, .close, .al-cross) { font-size: 24px !important; line-height: 1 !important; }
body :is(.round-action, .admin-icon) { font-size: 20px !important; line-height: 1 !important; }
body :is([data-task=production-links], .production-link-count) { font-size: var(--font-body) !important; }
.step .num { font-size: var(--font-meta) !important; }

/* Larger text must not be clipped in narrow or long-label controls. */
.v2-heading { height: auto; min-height: 48px; flex-shrink: 0; }
.v2-heading h1 { overflow-wrap: anywhere; }
.v2-admin-nav .button { height: auto; min-height: 36px; padding-top: 8px; padding-bottom: 8px; white-space: normal; }
.admin-panel-heading, .v2-model-heading { flex-wrap: wrap; }
.admin-panel-heading h3 { min-width: 0; overflow-wrap: anywhere; }
.unsaved-actions { flex-wrap: wrap; }
#unsavedChangesDialog button, #formErrorDialog button { height: auto; min-height: 34px; padding-top: 8px; padding-bottom: 8px; white-space: normal; }

/* The example represents an open card, so its title and field values use card sizes. */
body .sample-card>h2{font-size:var(--font-dialog)!important;line-height:var(--line-heading)!important}
body .sample-input{font-size:var(--font-field)!important;font-weight:400!important}

/* Direct price entry uses the same value size as card fields. */
body .result-table .run-inline-input{font-size:var(--font-field)!important;font-weight:400!important}
