/* Accessibility: every capture box, drop-down and text area gets a wide, high-contrast border so people with colour-blindness
   (and everyone else) can see exactly where a field starts and ends. Black on light pages, white on dark pages.
   Loaded by main.css and by the pages that do not use main.css. */
:root { --field-border: #000; --field-focus: #1d4ed8; }
body.dark { --field-border: #fff; --field-focus: #fcd34d; }
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="hidden"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="image"]),
select, textarea, .form-control, .filter-select {
  border: 2px solid var(--field-border) !important;
  border-radius: 8px;
}
/* Tick boxes and radio buttons: ONE clear border. The browser draws its own thin border on an unticked box, and an extra outline on top of it
   looked like a double border, so the native drawing is replaced by a single 2px border in the same high-contrast colour. */
input[type="checkbox"], input[type="radio"] {
  -webkit-appearance: none; appearance: none; outline: none; flex: none;
  width: 1.1em; height: 1.1em; border: 2px solid var(--field-border); border-radius: 4px; background-color: #fff;
  vertical-align: middle; cursor: pointer; background-position: center; background-repeat: no-repeat; background-size: 80%;
}
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"]:checked { background-color: var(--field-border);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3.2L13 4.8' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
input[type="radio"]:checked { background-color: var(--field-border); box-shadow: inset 0 0 0 3px #fff; }
input[type="checkbox"]:disabled, input[type="radio"]:disabled { opacity: .5; cursor: not-allowed; }
body.dark input[type="checkbox"], body.dark input[type="radio"] { background-color: #0f172a; }
body.dark input[type="checkbox"]:checked { background-color: var(--field-border);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3.2L13 4.8' fill='none' stroke='%230f172a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
body.dark input[type="radio"]:checked { box-shadow: inset 0 0 0 3px #0f172a; }
input[type="range"] { outline: 2px solid var(--field-border); outline-offset: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible, .form-control:focus, .filter-select:focus {
  outline: 3px solid var(--field-focus) !important; outline-offset: 2px; border-color: var(--field-border) !important;
}
input[type="file"] { border-style: dashed !important; }
input:disabled, select:disabled, textarea:disabled, .form-control:disabled { border-style: dashed !important; }
