/* Public reading scale. The homepage has its own composition using the same sizes.
   Never scale the document, printed labels, SVG geometry or document previews. */
@media screen {
  :root {
    --public-body: 16px;
    --public-caption: 14px;
    --public-lead: 18px;
    --public-title: clamp(30px, 3.4vw, 50px);
    --public-section: clamp(24px, 2.4vw, 32px);
  }

  body:not(.home-page) { font-size: var(--public-body); }
  body:not(.home-page) h1 { font-size: var(--public-title); line-height: 1.18; letter-spacing: -.04em; }
  body:not(.home-page) :is(.tool-heading, .article, .price-hero-copy, .discount-title, .gallery-intro) h1 {
    font-size: var(--public-title); line-height: 1.18;
  }
  body:not(.home-page) :is(.lead, .discount-title .lead) { font-size: var(--public-lead); line-height: 1.6; }
  body:not(.home-page) :is(.tool-heading, .gallery-intro) { max-width: 980px; }
  body:not(.home-page) .article { max-width: 920px; }
  body:not(.home-page) .article :is(p, li) { font-size: 17px; line-height: 1.7; }
  body:not(.home-page) .article h2 { font-size: var(--public-section); line-height: 1.3; }
  body:not(.home-page) .article table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.55; }
  body:not(.home-page) .article :is(th, td) { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
  body:not(.home-page) :is(.tools-catalog-heading, .guide-featured, .guide-boundary, .purchase-planning,
    .purchase-rhythm, .purchase-evidence, .discount-content, .online-price-steps, .price-required,
    .gallery-how, .gallery-next, .owned-share, .tools-system, .percentage-content, .vat-content,
    .invoice-content, .work-act-content, .workspace-heading, .logic-heading, .result-title-row,
    .price-compare-faq, .explain-heading, .table-diff-faq, .price-presets-heading, .quick-price-copy,
    .price-batch-heading, .template-share, .stock-depth, .stock-input-heading, .scanner-shell-head,
    .method-title, .scanner-formats, .scanner-limits, .scanner-next, .scanner-page .faq,
    .abc-entry-heading, .discount-panel-head, .percentage-panel-head, .vat-panel-head,
    .invoice-panel-head, .work-act-panel-head, .writeoff-builder-head, .writeoff-result,
    .instruction-heading, .turnover-quick > header, .turnover-batch-intro, .supplier-request,
    .qr-panel-head, .qr-result, .qr-process, .qr-faq, .qr-related, .qr-format-section,
    .mark-builder-head, .mark-result, .sku-quick-intro, .sku-levels, .sku-batch-heading,
    .sku-editorial-heading, .sku-examples-section, .sku-page .faq, .mismatch-builder-head,
    .mismatch-result, .layout-planner-head, .layout-result, .zero-tool-intro, .zero-cases,
    .zero-method, .zero-next, .zero-faq, .access-final, .lesson-route, .lesson-timeline,
    .lesson-files, .lesson-boundary, .lesson-check, .lesson-contact, .policy-copy,
    .update-copy, .pilot-divider) h2 { font-size: var(--public-section); line-height: 1.3; }

  body:not(.home-page) .site-header nav { gap: 20px; }
  body:not(.home-page) .site-header nav a { font-size: 16px; line-height: 1.4; }
  body:not(.home-page) .site-footer { font-size: 14px; line-height: 1.6; }
  body:not(.home-page) :is(.eyebrow, .brand-sub) { font-size: 14px; line-height: 1.6; letter-spacing: .07em; }
  body:not(.home-page) :is(.small, .privacy-note, .status, .notice, .flow-list p, .article pre) {
    font-size: var(--public-caption); line-height: 1.6;
  }
  body:not(.home-page) :is(.button, .text-button) { font-size: 16px; line-height: 1.45; }
  body:not(.home-page) .text-button { min-height: 44px; }
  body:not(.home-page) :is(.field, .input-heading, .upload, .owned-share-actions label) {
    font-size: var(--public-caption); line-height: 1.5;
  }
  body:not(.home-page) :is(textarea, select, .upload input, .owned-share-actions input) {
    font-size: 16px; line-height: 1.5;
  }
  body:not(.home-page) .owned-share-actions [role=status] { font-size: 14px; line-height: 1.5; }

  /* Catalogs: explanatory copy and labels have a reading role, not a thumbnail role. */
  body:not(.home-page) :is(.tool-status, .tool-kind, .tool-card ul, .tool-card .tool-processing,
    .tools-fact p, .guide-principle span, .guide-roadmap small, .template-meta,
    .gallery-strip, .gallery-note) { font-size: 14px; line-height: 1.55; }
  body:not(.home-page) :is(.tool-card > p, .guide-list p, .guide-principle p, .template-entry p) {
    font-size: 16px; line-height: 1.6;
  }
  body:not(.home-page) .template-meta { font-size: 14px !important; min-height: 0; }
  body:not(.home-page) :is(.template-entry .button, .tool-filters button, .tool-open) { font-size: 16px; }
  body:not(.home-page) .tools-paths b { font: 650 17px/1.45 Onest, sans-serif; }
  body:not(.home-page) .tools-fact strong { font: 650 20px/1.4 Onest, sans-serif; }

  /* Prices: retain the deliberate large monetary results, lift their small explanations. */
  body:not(.home-page) :is(.discount-kicker span, .discount-trust, .discount-reset,
    .discount-modes span, .discount-primary-fields > label > span:first-child, .discount-field-help,
    .discount-fields label, .discount-fields p, .discount-form .status, .discount-saving,
    .discount-grid dt, .discount-business-grid dt, .discount-business-grid dd,
    .discount-business > p, .discount-business .notice, .discount-note,
    .discount-placeholder > small, .discount-links span,
    .pricing-fields label, .pricing-fields p, .pricing-breakdown dt, .pricing-note,
    .price-hero-facts dd, .price-preset-list small, .price-preset-list span,
    .quick-price-grid label, .price-workbench .field, .price-caption, .price-rule strong,
    .price-rule p, .price-required-list p, .online-price-steps li p,
    .template-share .field, .price-next span) { font-size: 14px; line-height: 1.5; }
  body:not(.home-page) :is(.discount-modes b, .discount-business h3, .price-next strong) {
    font-size: 16px; line-height: 1.45;
  }
  body:not(.home-page) :is(.discount-fields input, .pricing-fields input, .template-share input) {
    font-size: 16px; line-height: 1.5;
  }
  body:not(.home-page) .discount-title h1 span { font-size: .78em; line-height: 1.2; }
  body:not(.home-page) #design-status { font-size: 14px; line-height: 1.5; }
  body:not(.home-page) :is(.discount-options summary, .discount-result-actions button) { font-size: 16px; line-height: 1.45; }
  body:not(.home-page) :is(.discount-options summary small, .discount-action-status, .discount-share-fallback) { font-size: 14px; line-height: 1.5; }

  body:not(.home-page) :is(.percentage-kicker span, .percentage-trust, .percentage-modes span,
    .percentage-direction label, .percentage-primary-fields > label > span, .percentage-field-help,
    .percentage-status, .percentage-formula span, .percentage-placeholder > small, .percentage-links span,
    .vat-kicker span, .vat-trust, .vat-modes span, .vat-amount > span:first-child, .vat-amount small,
    .vat-rates legend, .vat-status, .vat-links span,
    .invoice-kicker span, .invoice-trust, .invoice-party-grid legend, .invoice-form label > span,
    .invoice-options summary, .invoice-status, .invoice-steps span, .invoice-links span,
    .work-act-kicker span, .work-act-trust, .work-act-party-grid legend, .work-act-form label > span,
    .work-act-options summary, .work-act-status, .work-act-steps span, .work-act-links span) {
    font-size: 14px; line-height: 1.5;
  }
  body:not(.home-page) :is(.percentage-modes b, .percentage-reset, .vat-modes b, .vat-reset,
    .invoice-reset, .invoice-add, .invoice-toolbar button, .work-act-reset, .work-act-add,
    .work-act-toolbar button) { font-size: 16px; line-height: 1.45; }

  /* Operational tools: field labels and result captions; no document/diagram geometry. */
  body:not(.home-page) :is(.purchase-schema, .purchase-facts dd, .purchase-code, .purchase-badge,
    .purchase-amounts dt, .purchase-note, .purchase-rhythm span, .purchase-evidence span,
    .stock-hero-links a, .stock-form-note, .builder-help, .builder-field, .stock-builder-head,
    .stock-result-note, .stock-row-code, .stock-row-status) { font-size: 14px; line-height: 1.55; }
  body:not(.home-page) .purchase-amounts dt { text-transform: none; letter-spacing: 0; }
  body:not(.home-page) .purchase-rhythm strong { font: 650 16px/1.45 Onest, sans-serif; }
  body:not(.home-page) .purchase-facts dt { font: 650 16px/1.45 Onest, sans-serif; }
  body:not(.home-page) :is(.stock-builder-panel, .pricing-form, .address-fields, .invoice-form,
    .work-act-form, .field) :is(input, select, textarea) {
    font-size: 16px;
  }
  body:not(.home-page) :is(.address-fields label, .address-cell p, .statement-download aside span,
    .quick-formula, .quick-fields label span, .quick-result span, .stock-depth p, .stock-code,
    .stock-badge, .stock-amounts dt, .stock-warehouse-next p, .quick-modes legend,
    .builder-count, .builder-field > span, .sku-hero-facts dd, .sku-guard, .sku-quick-form label,
    .sku-quick-result span, .sku-quick-status, .sku-level-list p, .sku-settings-grid label,
    .sku-reserved-label, .sku-editorial-rows a, .sku-example-list span, .sku-next span,
    .safety-settings .field, .safety-metrics dt, .expiry-code, .expiry-badge, .expiry-values dt,
    .expiry-note, .quick-periods label, .quick-row label, .quick-labels, .abc-thresholds label,
    .abc-submit-copy span, .abc-code, .abc-values dt, .packing-upload label, .packing-reference span,
    .install-facts, .phone-selector span, .guide-video > p, .guide-video > a,
    .guide-result span, .install-address, .install-sources, .command-cloud span) {
    font-size: 14px; line-height: 1.5;
  }

  /* The receiving workbench has a separate, intentionally compact document preview. */
  body.receiving-page :is(.receiving-input-note, .receiving-toolbar > p, .receiving-grid-head,
    .receiving-row .row-result > small, .review-head .review-product > span,
    .review-numbers dt, .review-disclosure > .review-equation, .review-disclosure > .review-note,
    .review-head .issue-pill, .receiving-row .row-more > summary, .receiving-remove) {
    font-size: 14px; line-height: 1.45;
  }
  body.receiving-page .receiving-row .receiving-cell-code input { font-size: 14px; }
  body.receiving-page :is(.receiving-row .cell-label, .receiving-encoding-label,
    .field-error, .required-note, .receiving-form-actions > p, .receiving-help > summary > span,
    .receiving-sources small, .receiving-legal-note, .receiving-related small,
    .receiving-share p, .receiving-additional > summary > span) { font-size: 14px; line-height: 1.5; }
  body.receiving-page .receiving-title-copy > p { font-size: 16px; line-height: 1.5; }
  body.receiving-page .receiving-encoding-label > span { font-size: 14px; line-height: 1.4; max-width: none; }
  body.receiving-page .receiving-title-line h1 { font-size: clamp(28px, 3vw, 42px); }

  @media (max-width: 760px) {
    :root { --public-title: 32px; --public-section: 26px; }
    body:not(.home-page) .site-header nav { flex-wrap: wrap; gap: 8px 18px; }
    body:not(.home-page) .site-header nav a { font-size: 14px; }
    body:not(.home-page) :is(.lead, .discount-title .lead) { font-size: 17px; }
    body:not(.home-page) .article :is(p, li) { font-size: 16px; }
    body:not(.home-page) :is(.purchase-hero, .tools-hero, .guide-hub-hero, .pricing-hero) {
      gap: 24px; padding-block: 32px;
    }
    body:not(.home-page) .discount-business-grid { grid-template-columns: 1fr; }
    body:not(.home-page) .discount-modes { grid-template-columns: 1fr; gap: 8px; }
    body:not(.home-page) .discount-modes button { min-height: 48px; padding: 12px 14px; }
    body:not(.home-page) .discount-modes b { font-size: 16px; line-height: 1.4; }
    body.receiving-page .receiving-row .receiving-cell-code input { font-size: 16px; }
  }
}
