/* Borderless public controls. Text fields keep a thin edge (WCAG 1.4.11) and keyboard focus shows a ring (WCAG 2.4.7); mouse and touch focus show no ring.
   Game Kit board cells (squares, pits, tiles and cards) are game pieces rather than page controls: they keep their own edges and selection marks.
   The exception sits inside :where() so it adds no specificity; otherwise this rule would outrank the field edge below and every field would lose its edge. */
body:not(.wp-admin) :is(button,input,textarea,select,summary,a,[role="button"],[role="checkbox"],[role="radio"],[role="tab"],[role="switch"],[contenteditable="true"],fieldset,.otk-hero-search,.otk-search-field,.sp-advanced,.sp-import-panel):not(:where(.otk-game-kit .gk-board :is(button,[role="button"]):not(.gk-button,.gk-primary))) {
  border: 0 !important;
  outline: none !important;
  box-shadow: none !important;
}
/* Field edge: #74839a is at least 3.3:1 against white, #f0f0f0 and the page canvas. */
body:not(.wp-admin) :is(input:where(:not([type="checkbox"],[type="radio"],[type="range"],[type="color"],[type="file"],[type="submit"],[type="button"],[type="reset"],[type="image"],[type="hidden"])),textarea,select,.otk-hero-search,.otk-search-field) {
  box-shadow: inset 0 0 0 1px #74839a !important;
}
/* Search boxes draw the edge on their wrapper, so the transparent input inside has none. */
body:not(.wp-admin) :is(.otk-hero-search,.otk-search-field) :is(input,textarea,select) {
  box-shadow: none !important;
}
/* Keyboard focus: a 3px #0053e2 ring (5.8:1 on the canvas) with a white gap so it also shows next to blue controls. */
body:not(.wp-admin) :is(button,input,textarea,select,summary,a,[role="button"],[role="checkbox"],[role="radio"],[role="tab"],[role="switch"],[contenteditable="true"]):focus-visible,
body:not(.wp-admin) [tabindex]:not([tabindex="-1"]):focus-visible {
  outline: 3px solid #0053e2 !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 0 2px #fff !important;
}
/* A focused text field shows a 2px #0053e2 edge inside the field instead of the outer ring, so a typing box is not framed by a heavy outline. */
body:not(.wp-admin) :is(input:where(:not([type="checkbox"],[type="radio"],[type="range"],[type="color"],[type="file"],[type="submit"],[type="button"],[type="reset"],[type="image"],[type="hidden"])),textarea,select):not(:where(.otk-hero-search *,.otk-search-field *)):focus-visible:focus {
  outline: none !important;
  outline-offset: 0 !important;
  box-shadow: inset 0 0 0 2px #0053e2 !important;
}
/* Game screens move focus to their boards themselves; the ring shows there only while the player uses the keyboard. */
body:not(.wp-admin) :is(.otk-game-kit,.otk-language-lab.tg):not(.otk-keyboard-input) :is(svg,[tabindex],button,a,summary,[role="button"]):focus-visible {
  outline: none !important;
  box-shadow: none !important;
}
/* The search box rings itself while its field has keyboard focus; its button keeps its own ring. Without :has() support the field rings instead. */
body:not(.wp-admin) :is(.otk-hero-search,.otk-search-field):has(:is(input,textarea,select):focus-visible) {
  outline: 3px solid #0053e2 !important;
  outline-offset: 2px !important;
}
body:not(.wp-admin) :is(.otk-hero-search,.otk-search-field):has(:is(input,textarea,select):focus-visible) :is(input,textarea,select):focus-visible {
  outline: none !important;
  box-shadow: none !important;
}
body:not(.wp-admin) a:focus-visible {text-decoration:underline !important;text-decoration-thickness:2px !important}
body:not(.wp-admin) .otk-output:focus:not(:focus-visible) {outline:none !important;box-shadow:none !important}
.otk-sp .sp-scan-summary {padding:18px;background:#f5f7fa;border:1px solid #d3dae4;border-radius:12px;margin:0 0 24px;overflow-wrap:anywhere}
.otk-sp .sp-scan-summary h2 {font-size:21px;margin-bottom:8px}
.otk-sp progress {display:block;width:100%;height:10px;accent-color:#64748b;margin:12px 0}
.otk-sp progress[hidden] {display:none}

/* dark-mode:start — generated by scripts/dark-mode.py from assets/focus.css; do not edit by hand */
@media screen{
 html[data-theme="dark"] body:not(.wp-admin) :is(button,input,textarea,select,summary,a,[role="button"],[role="checkbox"],[role="radio"],[role="tab"],[role="switch"],[contenteditable="true"],fieldset,.otk-hero-search,.otk-search-field,.sp-advanced,.sp-import-panel):not(:where(.otk-game-kit .gk-board :is(button,[role="button"]):not(.gk-button,.gk-primary))){border:0 !important;outline:none !important;box-shadow:none !important}
 html[data-theme="dark"] body:not(.wp-admin) :is(input:where(:not([type="checkbox"],[type="radio"],[type="range"],[type="color"],[type="file"],[type="submit"],[type="button"],[type="reset"],[type="image"],[type="hidden"])),textarea,select,.otk-hero-search,.otk-search-field){box-shadow:inset 0 0 0 1px #53647e !important}
 html[data-theme="dark"] body:not(.wp-admin) :is(.otk-hero-search,.otk-search-field) :is(input,textarea,select){box-shadow:none !important}
 html[data-theme="dark"] body:not(.wp-admin) :is(button,input,textarea,select,summary,a,[role="button"],[role="checkbox"],[role="radio"],[role="tab"],[role="switch"],[contenteditable="true"]):focus-visible,
html[data-theme="dark"] body:not(.wp-admin) [tabindex]:not([tabindex="-1"]):focus-visible{outline:3px solid #0053e2 !important;box-shadow:0 0 0 2px #212121 !important}
 html[data-theme="dark"] body:not(.wp-admin) :is(input:where(:not([type="checkbox"],[type="radio"],[type="range"],[type="color"],[type="file"],[type="submit"],[type="button"],[type="reset"],[type="image"],[type="hidden"])),textarea,select):not(:where(.otk-hero-search *,.otk-search-field *)):focus-visible:focus{outline:none !important;box-shadow:inset 0 0 0 2px #0053e2 !important}
 html[data-theme="dark"] body:not(.wp-admin) :is(.otk-game-kit,.otk-language-lab.tg):not(.otk-keyboard-input) :is(svg,[tabindex],button,a,summary,[role="button"]):focus-visible{outline:none !important;box-shadow:none !important}
 html[data-theme="dark"] body:not(.wp-admin) :is(.otk-hero-search,.otk-search-field):has(:is(input,textarea,select):focus-visible){outline:3px solid #0053e2 !important}
 html[data-theme="dark"] body:not(.wp-admin) :is(.otk-hero-search,.otk-search-field):has(:is(input,textarea,select):focus-visible) :is(input,textarea,select):focus-visible{outline:none !important;box-shadow:none !important}
 html[data-theme="dark"] body:not(.wp-admin) .otk-output:focus:not(:focus-visible){outline:none !important;box-shadow:none !important}
 html[data-theme="dark"] .otk-sp .sp-scan-summary:not([data-otk-paper],[data-otk-paper] *){background:#191919;border:1px solid #3f3f3f}
}
/* dark-mode:end */
