/* Compact labels and numbers shrink with their container, never digit by digit.
   Long report text and editable fields retain their natural wrapping/size. */
.kimia-page-bar{container-type:inline-size;gap:clamp(6px,1.2vw,12px)}
.kimia-page-bar__identity{flex:1;min-width:0}
.kimia-page-bar h1{font-size:clamp(18px,4.8cqi,24px);line-height:1.55;overflow-wrap:anywhere;text-wrap:pretty}
.kimia-page-bar p{overflow-wrap:anywhere}
.kimia-page-bar p{font-size:12px}
.kimia-page-count,.kimia-page-bar h1 small,.kimia-page-back{white-space:nowrap}
.kimia-page-back .kimia-icon{flex:none}
.kimia-page-count{display:inline-block;font-variant-numeric:tabular-nums}
.kimia-inbox-queue__heading [data-inbox-count],.kimia-inbox-priority{flex:none;white-space:nowrap;font-variant-numeric:tabular-nums}
.kimia-inbox-priority::before{flex:none}
.kimia-inbox-row__foot time{display:inline-block;white-space:nowrap;font-variant-numeric:tabular-nums}
.kimia-inbox-kinds button{white-space:nowrap}

/* Unequal labels need unequal space. Extremely large counts can scroll within
   the controls, without pushing the whole page wider or concealing a value. */
body .kimia-manager-sections{grid-template-columns:minmax(max-content,1.5fr) minmax(max-content,1fr);gap:6px;overflow-x:auto}
body :is(.kimia-manager-sections,.kimia-support-sections) a{min-height:48px;gap:5px;padding-inline:clamp(6px,1.6vw,12px);font-size:clamp(12px,3.7vw,14px)}
body :is(.kimia-manager-sections,.kimia-support-sections) a>span{white-space:nowrap}
body :is(.kimia-manager-sections,.kimia-support-sections) b{flex:none;white-space:nowrap;min-width:1.6rem;font-variant-numeric:tabular-nums}

@media(max-width:480px){
 .kimia-page-back{gap:5px;padding-inline:8px;font-size:12px}
 .kimia-inbox-kinds button{flex-basis:136px;padding-inline:6px}
 .kimia-inbox-row__title{font-size:14px}
 body .kimia-support-sections a{padding-inline:4px}
}

/* A source form is moved outside .ws-main into a dialog. Keep the same field
   geometry there and reserve space for the close control only once. */
.kimia-source-sheet{position:fixed;inset:var(--kimia-sheet-top,12px) 0 auto;margin:0 auto;max-height:var(--kimia-sheet-height,calc(100dvh - 24px));overflow:auto;overscroll-behavior:contain;box-sizing:border-box}
@media(max-width:760px){.kimia-source-sheet{width:calc(100% - 16px);border-radius:20px}}
.kimia-source-sheet__close{position:absolute;inset-inline-end:16px;inset-block-start:34px;float:none}
.kimia-source-sheet .kimia-page-bar{padding-inline-end:52px;align-items:flex-start}
.kimia-source-sheet .kimia-page-bar h1{padding-inline:0}
.kimia-source-sheet .kimia-page-bar .kimia-page-back{display:none}
.kimia-source-sheet .ws-field{min-width:0}
.kimia-source-sheet .ws-field :is(input:not([type=radio]):not([type=checkbox]),textarea,select){box-sizing:border-box;width:100%;max-width:100%;min-width:0;min-height:46px;padding:10px 12px;border:1px solid var(--kimia-border);border-radius:12px}
.kimia-source-sheet .ws-current{font-size:12px;line-height:1.8;overflow-wrap:anywhere}
.kimia-source-sheet .ws-field label{font-size:14px;line-height:1.8}
.kimia-source-sheet .ws-form-fields{gap:18px}
.kc-person strong,.kc-person small{overflow-wrap:anywhere}
.kc-person .kc-person-phone{direction:ltr;text-align:start;unicode-bidi:isolate;font-variant-numeric:tabular-nums;font-size:13px;margin-top:5px;color:var(--kimia-text)}
@media(max-width:600px){.kimia-source-sheet .ws-form-fields{grid-template-columns:minmax(0,1fr)}.kimia-source-sheet .ws-form-actions{gap:8px}.kimia-source-sheet .ws-form-actions>*{width:100%;justify-content:center}}
