/* Shared UI type scale. Load after legacy screen styles; printed notes retain
   their document typography. Input size on phones avoids automatic iOS zoom. */
:root{
  --ui-font:'Segoe UI',system-ui,-apple-system,BlinkMacSystemFont,'Noto Sans',Arial,sans-serif;
  --ui-text:14px;--ui-small:12px;--ui-control:14px;--ui-input:14px;--ui-table:13px;
  --ui-h1:22px;--ui-h2:18px;--ui-h3:16px;--ui-product-title:18px;--ui-price:20px;
  --ui-label:13px;--ui-panel-title:18px;
  --ui-line:1.45;--ui-target:36px;
}
:root.large-text{
  --ui-text:16px;--ui-small:14px;--ui-control:16px;--ui-input:16px;--ui-table:15px;
  --ui-h1:28px;--ui-h2:23px;--ui-h3:18px;--ui-product-title:22px;--ui-price:24px;
  --ui-label:15px;--ui-panel-title:21px;
}
body:not(.issue-note-page){font-family:var(--ui-font);font-size:var(--ui-text);line-height:var(--ui-line)}
body:not(.issue-note-page) :is(p,label,legend,.quote-line,.customer-note,.line-name){font-size:var(--ui-text)!important;line-height:var(--ui-line)!important}
body:not(.issue-note-page) :is(small,.muted,.customer-muted,.eyebrow,.product-code,.product-sub,.quantity-price-badge,.case-badge,.search-hint,.variant-gallery-note){font-size:var(--ui-small)!important;line-height:1.4!important}
body:not(.issue-note-page) :is(h1,h2,h3){line-height:1.3}
body:not(.issue-note-page) h1{font-size:var(--ui-h1)}
body:not(.issue-note-page) h2{font-size:var(--ui-h2)}
body:not(.issue-note-page) h3{font-size:var(--ui-h3)}
body:not(.issue-note-page) :is(button,.btn,.edit-link,.pagination a){font-family:var(--ui-font);font-size:var(--ui-control)!important;line-height:1.35!important;min-height:var(--ui-target);padding:8px 12px}
body:not(.issue-note-page) :is(input,select,textarea){font-family:var(--ui-font);font-size:var(--ui-input)!important;line-height:1.4!important}
body:not(.issue-note-page) :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea){min-height:var(--ui-target);padding:8px 10px}
body:not(.issue-note-page) :is(.order-table,.customer-order-table,.itemtable) :is(td,th){font-size:var(--ui-table)!important;line-height:1.45!important;padding:10px 9px}
body:not(.issue-note-page) :is(.admin-title h1,.sale-main>h1,.customer-main h1){font-size:var(--ui-h1)}
body.admin-body .admin-sidebar nav>a{font-size:var(--ui-text);min-height:var(--ui-target);padding:8px 10px}
/* Native select/input intrinsic widths must not expand a proof/weight grid. */
body.admin-body .v17-weight-form{grid-template-columns:minmax(0,1fr);min-inline-size:0}
body.admin-body .v17-weight-form :is(label,input,select,textarea,button){min-inline-size:0;max-inline-size:100%;box-sizing:border-box}
body.admin-body .v17-weight-form :is(input,select,textarea){inline-size:100%}
body:not(.issue-note-page) :is(.product-info h3,.cart-item-title strong){font-size:var(--ui-text)!important;line-height:1.4!important}
body.web-order #product-page .product-heading h1{font-size:var(--ui-product-title);line-height:1.3;margin-bottom:8px}
body.web-order #product-page #product-display-price{font-size:var(--ui-price);line-height:1.25}
body.web-order #search{font-size:var(--ui-input)!important}
body.web-order #product-page .variant-submit-meta strong{font-size:var(--ui-h2);line-height:1.3}
body.web-order #product-page label{margin-bottom:12px}
body.web-order #product-page :is(.choice-cards b,.v17-cover-choice b){font-size:var(--ui-text)}
body.web-order #product-page :is(.choice-cards small,.toggle small,.v17-cover-choice small,.cut-grid button small){font-size:var(--ui-small)!important;line-height:1.4!important}
body.web-order #product-page .cut-grid button{font-size:var(--ui-control)!important;min-height:64px;padding:8px;gap:4px;line-height:1.35!important}
body.web-order #product-page .cut-grid button img{width:24px;height:24px}
body.web-order #product-page :is(.choice-cards label,.toggle,.v17-cover-choice){padding:10px;gap:8px;margin-bottom:8px}
body.web-order #product-page :is(.quantity-price-policy summary,.product-specifications summary,.product-price-details summary){font-size:var(--ui-text);min-height:var(--ui-target);padding:8px 0}
body.web-order #product-page .quantity-price-policy :is(th,td){font-size:var(--ui-small)!important;padding:7px 6px}
body.web-order #product-page #quote-box{font-size:var(--ui-text);line-height:1.45;padding:12px}
body.web-order #product-page .quote-big{font-size:var(--ui-h3)!important}
body.web-order #product-page .product-buy-actions :is(#variant-add,#variant-buy){font-size:var(--ui-control)!important;min-height:44px;padding:10px 12px}
body.web-order :is(#cart-checkout-trigger,#submit-order,#success-close){min-height:44px}
body.web-order .quantity-field :is(button,input){min-height:44px;height:44px;padding:8px}
body.web-order .quantity-field button{font-size:20px!important}
body.web-order :is(#quick-order-close,#cart-close,#photo-close,#photo-prev,#photo-next){font-size:24px!important;line-height:1!important}
body.web-order #variant-gallery .variant-gallery-button{padding:3px;min-height:44px}
@media(max-width:700.98px){
  :root{--ui-input:16px;--ui-target:44px;--ui-h1:20px;--ui-product-title:17px;--ui-price:18px}
  :root.large-text{--ui-input:18px;--ui-h1:26px;--ui-product-title:20px;--ui-price:22px}
  body:not(.issue-note-page) :is(input,select,textarea){font-size:var(--ui-input)!important}
  /* Keep all five thumbnails next to the photo, before long buying options. */
  body.web-order.quick-order-open .variant-gallery{grid-row:3}
  body.web-order.quick-order-open .product-stock{grid-row:4}
  body.web-order.quick-order-open .variant-body{grid-row:5}
}

/* Resolve the more specific legacy Quick Order/cart selectors at the source
   of the type scale. Keep 16px phone inputs and the explicit A+ preference. */
body.web-order:is(.quick-order-open,.web-order--product) #product-page .product-heading h1{
  font-size:var(--ui-product-title);line-height:1.3;letter-spacing:normal;
}
body.web-order:is(.quick-order-open,.web-order--product) #product-page #product-display-price,
body.web-order:is(.quick-order-open,.web-order--product) #product-page .product-buy-bar .variant-submit-meta strong,
body.web-order #cart-panel #cart-total-value{font-size:var(--ui-price);line-height:1.3}
body.web-order #cart-panel .cart-header h2{font-size:var(--ui-panel-title);line-height:1.3}
body.web-order #product-page :is(.variant-body>label,.v17-cover-choice,.choice-cards label,.toggle),
body.web-order #cart-panel :is(label,.crm-verify p){font-size:var(--ui-label)!important;line-height:1.45!important}
body.web-order #product-page :is(.quote-line,.quote-line b,.quote-big b,.quote-big span),
body.web-order #cart-panel :is(.cart-item .price-strong,.cart-actions,.customer-fee-details){font-size:var(--ui-text)!important;line-height:1.45}
body.web-order #product-page .product-buy-bar :is(#variant-add,#variant-buy,#cart-add-view),
body.web-order #cart-panel :is(#cart-checkout-trigger,#submit-order){font-size:var(--ui-control)!important;line-height:1.35!important}
body.web-order #product-page .ux-cart-added strong{font-size:var(--ui-label);line-height:1.4}
body.web-order #product-page .ux-cart-added small{font-size:var(--ui-small)!important;line-height:1.35!important}
body.web-order #product-page .variant-body{padding-block:12px}
body.web-order #product-page label{margin-bottom:10px}
body.web-order #cart-panel .crm-verify{padding:12px}
body.web-order #cart-panel :is(input,select,textarea){box-sizing:border-box;max-width:100%;min-width:0}
body.web-order #cart-panel .cart-quantity-edit :is(button,input){min-height:44px;height:44px;box-sizing:border-box}
body.web-order .product-price{font-size:var(--ui-price)}

/* Locale controls must preserve the complete selected language. */
body:not(.issue-note-page) .m21-locale-control{min-width:0;flex-shrink:0}
body:not(.issue-note-page) .m21-locale-control select{min-width:132px;width:auto;max-width:100%;padding-inline-end:28px}
body:not(.issue-note-page) summary:focus-visible{outline:3px solid #175cd3;outline-offset:2px}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto!important}*,*::before,*::after{animation-duration:.01ms!important;transition-duration:.01ms!important}}
