/* Shared text practices for every screen shell, loaded after text-links.css.
   Screen only: print, documents and signatures keep their own type. */
@media screen {
  /* Headings wrap evenly; paragraphs avoid a lone last word. */
  :is(h1, h2, h3, h4, [data-type-role="title"], [data-type-role="section"], [data-type-role="card-title"]):not(:where([data-type-preserve], [data-type-preserve] *)) {
    text-wrap: balance;
  }
  :is(p, li, dd, blockquote):not(:where([data-type-preserve], [data-type-preserve] *, [contenteditable], [contenteditable] *)) {
    text-wrap: pretty;
  }

  /* Readable line length for running text in the signed-in apps. Centered copy keeps its centring.
     Public pages keep their own copy widths. */
  body[data-product-type] :is(main, [role="main"], .ow-main, dialog, .modal) :is(p, .hint, .ow-note, .ow-help, .ow-field-help, .help-text, .field-help, .form-text, .description):not(:where(
    [data-type-preserve], [data-type-preserve] *, [contenteditable], [contenteditable] *,
    .lease-document *, .document-preview *, .ql-editor *, .ProseMirror *, td *, th *
  )) {
    max-inline-size: 70ch;
  }
  body[data-product-type] :is(main, [role="main"], .ow-main, dialog, .modal) :is(p, .hint, .ow-note, .ow-help, .description)[style*="center"],
  body[data-product-type] :is(main, [role="main"], .ow-main, dialog, .modal) :is([style*="text-align: center"], [style*="text-align:center"], .text-center, [class*="empty"], [class*="center"], [class*="hero"]) :is(p, .hint, .description) {
    margin-inline: auto;
  }

  /* Money digits line up in tables, price and amount blocks. */
  :is(table, [class*="price"], [class*="amount"], [class*="money"], [class*="balance"], [class*="total"], .num, [data-money-list]) {
    font-variant-numeric: tabular-nums;
  }
}
