@layer cb-refined-accessibility, cb-refined-forms;
@layer cb-refined-accessibility {
@media (forced-colors:active) {
  body :is(input,select,textarea) { border:1px solid CanvasText !important; box-shadow:none !important; }
  body select:not([multiple]):not([size]) { appearance:auto !important; background-image:none !important; }
  body :is(input,select,textarea):focus-visible { outline:3px solid Highlight !important; }
}
}
/* Layered important rules intentionally outrank legacy unlayered important form overrides. */
@layer cb-refined-forms {
/* Shared form finish. Native controls, labels, validation and semantics are retained. */
:root {
  --cb-field-ink:#153451;
  --cb-field-muted:#52687e;
  --cb-field-border:#899eb5;
  --cb-field-accent:#075bc7;
  --cb-field-radius:12px;
}
body :is(input:not([type]), input[type="text"], input[type="email"], input[type="password"],
  input[type="search"], input[type="tel"], input[type="url"], input[type="number"],
  input[type="date"], input[type="time"], input[type="datetime-local"], input[type="month"],
  input[type="week"], select, textarea) {
  box-sizing:border-box;
  min-width:0;
  max-width:100%;
  min-height:52px !important;
  padding:14px 16px !important;
  border:1px solid var(--cb-field-border) !important;
  border-radius:var(--cb-field-radius) !important;
  background-color:#fff !important;
  color:var(--cb-field-ink) !important;
  font-family:var(--cb-font-body,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif) !important;
  font-size:16px !important;
  font-weight:450 !important;
  line-height:1.5 !important;
  letter-spacing:normal;
  box-shadow:0 1px 2px rgb(15 45 75 / 4%), inset 0 1px 0 rgb(255 255 255 / 85%) !important;
  transition:border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}
body :is(input,textarea)::placeholder { color:var(--cb-field-muted) !important; opacity:1; font-weight:400; }
body :is(input:not([type]),input[type="text"],input[type="email"],input[type="password"],input[type="search"],
  input[type="tel"],input[type="url"],input[type="number"],input[type="date"],input[type="time"],
  input[type="datetime-local"],input[type="month"],input[type="week"],select,textarea):hover:not(:disabled):not(:focus) {
  border-color:#557697 !important;
  background-color:#fbfdff !important;
}
body :is(input,select,textarea):focus-visible {
  outline:3px solid var(--cb-field-accent) !important;
  outline-offset:3px !important;
}
body :is(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
  select,textarea):focus {
  border-color:var(--cb-field-accent) !important;
  box-shadow:0 0 0 4px rgb(7 91 199 / 10%) !important;
}
body textarea:not([hidden]) { resize:vertical; min-height:140px !important; }
body select:not([multiple]):not([size]) {
  appearance:none !important;
  padding-inline-end:48px !important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2352687e' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
  background-repeat:no-repeat !important;
  background-position:right 16px center !important;
  background-size:18px !important;
  cursor:pointer;
}
body select[multiple], body select[size] { background-image:none !important; padding:10px !important; }
body select option { color:#153451; background:#fff; padding:8px; }
body :is(input,select,textarea):disabled {
  color:#5c6c7d !important;
  background-color:#edf1f5 !important;
  border-color:#a6b4c3 !important;
  opacity:1;
  cursor:not-allowed;
}
body :is(input,textarea)[readonly] { background-color:#f3f6f9 !important; }
body :is(input,select,textarea)[aria-invalid="true"],
body :is(input,select,textarea):user-invalid {
  border-color:#b42335 !important;
}
body :is(input[type="checkbox"],input[type="radio"],input[type="range"]) {
  accent-color:var(--cb-field-accent);
}
body input[type="file"] {
  max-width:100%; font:inherit; color:var(--cb-field-muted);
}
body input[type="file"]::file-selector-button {
  min-height:44px; margin-inline-end:12px; padding:10px 16px;
  border:1px solid var(--cb-field-border); border-radius:10px;
  background:#f3f7fc; color:var(--cb-field-ink); font:600 14px/1.4 system-ui,sans-serif;
  cursor:pointer;
}
/* Reserve the existing password visibility button's hit target. */
body .cb-password-field input { padding-inline-end:60px !important; }
body .cb-password-field button.cb-password-toggle { right:6px; border-radius:8px; }
body :is(.form-help,.form-note,.workflow-note) { line-height:1.6; }
@media (prefers-reduced-motion:reduce) {
  body :is(input,select,textarea) { transition:none !important; }
}
@media (max-width:640px) {
  body :is(input,select,textarea) { scroll-margin-block:90px; }
}

}
