/* Phase 34: keyboard accessibility + resilient EN/HI layout. Brand colors preserved. */
:root { --haaka34-focus: #a54213; }
[data-theme="dark"] { --haaka34-focus: #f8ac61; }
:where(a,button,input,textarea,select,summary,[tabindex]):focus-visible {
  outline: 3px solid var(--haaka34-focus) !important;
  outline-offset: 3px !important;
  box-shadow: 0 0 0 2px var(--haaka34-focus, #a54213) !important;
}
:where(a,button,input,textarea,select,summary) { scroll-margin-block: 100px; }
.skip-link:focus, .skip-link:focus-visible {
  position:fixed !important; left:16px !important; top:12px !important;
  z-index:2147483647 !important; display:inline-flex !important;
  width:auto !important; height:auto !important; padding:12px 18px !important;
  clip:auto !important; clip-path:none !important; opacity:1 !important;
  color:#fff !important; background:#923818 !important; border-radius:6px !important;
}
:where(.site-header,.admin14-header) { scroll-margin-top: 0; }
:where(#main,[id="results"],.haaka33-page section) { scroll-margin-top: 88px; }
:where(.haaka33-form label,.copy-edit-form label) { display:block; min-width:0; }
:where(.haaka33-form input,.haaka33-form textarea,.haaka33-form select) { max-width:100%; }
:where(.haaka33-card,.haaka33-workspace,.admin14-content-inner) { min-width:0; overflow-wrap:anywhere; }
:where(.haaka33-record,.copy-list-item) { overflow-wrap:anywhere; }
:where(input,select,textarea,button) { font:inherit; }
:where(input[type="checkbox"],input[type="radio"]) { min-width:18px; min-height:18px; }
@media (max-width:767px) {
  :where(.haaka33-form button,.haaka33-form input[type=file]) { min-height:44px; }
  :where(.haaka33-page,.admin14-content) { overflow-x:clip; }
  :where(.haaka33-record,.haaka33-tabs a) { min-height:44px; }
}
@media (prefers-reduced-motion: reduce) {
  :where(html) { scroll-behavior:auto !important; }
  :where(.site-header *, .haaka33-page *, .admin14-shell *, .library08 *) {
    animation-duration:0.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:0.01ms !important;
  }
}
@media (forced-colors:active) {
  :where(a,button,input,select,textarea,summary):focus-visible { outline:2px solid Highlight !important; box-shadow:none !important; }
}

.haaka34-stats {display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin:20px 0;}
.haaka34-stats > div {border:1px solid var(--border,#dccfc2);border-radius:12px;padding:16px;display:grid;gap:4px;}
.haaka34-stats strong {font-size:clamp(1.5rem,3vw,2.2rem);line-height:1.1;}
.haaka34-stats span {font-size:.9rem;}
