/* Deskia Business · Operational typography contract v19
   Admin UI only. Values here govern *all* tokenized operational components.
   Page-specific layout and authored documents keep their own typography. */
:root {
  --deskia-font: Manrope, "Segoe UI Variable", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --db-font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --db-type-micro: 10.5px;
  --db-type-meta: 11.5px;
  --db-type-small: 12px;
  --db-type-body: 13px;
  --db-type-body-lg: 14px;
  --db-type-subheading: 15px;
  --db-type-section: 16px;
  --db-type-title: 18px;
  --db-type-page: 20px;
  --db-type-metric: 24px;
  --db-weight-regular: 400;
  --db-weight-medium: 500;
  --db-weight-semibold: 600;
  --db-weight-bold: 700;
  --db-weight-extrabold: 800;
  --type-micro: var(--db-type-micro);
  --type-meta: var(--db-type-meta);
  --type-small: var(--db-type-small);
}

/* Both supported admin shells share one body rhythm and accessible fallbacks. */
body.deskia-v5-body,
body.is-authenticated {
  font-family: var(--deskia-font);
  font-size: var(--db-type-body);
  font-weight: var(--db-weight-regular);
  line-height: 1.5;
}

body.deskia-v5-body :is(button, input, select, textarea, optgroup, option),
body.is-authenticated :is(button, input, select, textarea, optgroup, option) {
  font-family: inherit;
}

/* Technical information stays monospaced; do not override rich-text contents. */
:where(code, pre, kbd, samp, textarea.deskia-rte-source, .v5-code-block) {
  font-family: var(--db-font-mono);
}

/* Reusable semantic roles for all new and refactored screens. */
.db-type-micro { font-size: var(--db-type-micro); font-weight: var(--db-weight-semibold); line-height: 1.35; }
.db-type-meta { font-size: var(--db-type-meta); font-weight: var(--db-weight-regular); line-height: 1.45; }
.db-type-small { font-size: var(--db-type-small); font-weight: var(--db-weight-regular); line-height: 1.45; }
.db-type-body { font-size: var(--db-type-body); font-weight: var(--db-weight-regular); line-height: 1.5; }
.db-type-label { font-size: var(--db-type-small); font-weight: var(--db-weight-semibold); line-height: 1.4; }
.db-type-section { font-size: var(--db-type-section); font-weight: var(--db-weight-bold); line-height: 1.3; }
.db-type-title { font-size: var(--db-type-title); font-weight: var(--db-weight-bold); line-height: 1.2; }
.db-type-page { font-size: var(--db-type-page); font-weight: var(--db-weight-bold); line-height: 1.2; }
.db-type-metric { font-size: var(--db-type-metric); font-weight: var(--db-weight-bold); line-height: 1.1; font-variant-numeric: tabular-nums; }

/* Avoid unexpected zooming of select/input focus in iOS. Leave compact controls alone. */
@media (max-width: 767px) and (pointer: coarse) {
  body.deskia-v5-body :is(input[type="text"], input[type="email"], input[type="tel"], input[type="search"], input[type="number"], input[type="password"], input[type="date"], textarea, select):not(.deskia-rte-source),
  body.is-authenticated :is(input[type="text"], input[type="email"], input[type="tel"], input[type="search"], input[type="number"], input[type="password"], input[type="date"], textarea, select):not(.deskia-rte-source) {
    font-size: max(16px, 1em);
  }
}
