/* Project rule: one 1px brand border on the field being edited, never an outer ring. */
:root { --field-focus-color: #0369a1; }
:where(input:not([type='checkbox']):not([type='radio']):not([type='range']):not([type='file']):not([type='button']):not([type='submit']):not([type='reset']), textarea, select, [contenteditable='true']):focus {
    border-color: var(--field-focus-color) !important;
    border-width: 1px !important;
    border-style: solid !important;
    outline: none !important;
    box-shadow: none !important;
}
label:has(> :is(input, textarea, select):focus),
label:has(+ :is(input, textarea, select):focus),
label:has(> :is(input, textarea, select):focus) > .cb-field-label,
.cb-field:focus-within .cb-field-label,
.bm-outlined-field:focus-within > legend,
.bm-outlined-field:focus-within > legend > label {
    color: var(--field-focus-color) !important;
}
/* Keep entered text in its ordinary ink color when the label wraps the control. */
label:has(> :is(input, textarea, select):focus) > :is(input, textarea, select) {
    color: var(--cb-ink, #0f172a);
}
.bm-outlined-field:focus-within, .intake-date-control:focus-within,
.ql-container:has(.ql-editor:focus) {
    border: 1px solid var(--field-focus-color) !important;
    outline: none !important;
    box-shadow: none !important;
}
/* An outlined fieldset/date wrapper already owns the field's single border. */
.bm-outlined-field :is(input, textarea, select),
.bm-outlined-field :is(input, textarea, select):focus,
.intake-date-control input, .intake-date-control input:focus,
.ql-container .ql-editor:focus {
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
}
