
/* =========================================================
   GHWM ACCESSIBILITY WIDGET
   ========================================================= */

.ghwm-a11y {
  --a11y-navy: #102846;
  --a11y-green: #355f00;
  --a11y-text: #132238;
  --a11y-border: #c8d0da;
  --a11y-focus: #005fcc;

  position: fixed;
  right: 24px;
  bottom: 88px;
  z-index: 10000;
  color: var(--a11y-text);
  font: 16px/1.5 Arial, Helvetica, sans-serif;
  letter-spacing: normal;
  word-spacing: normal;
}

.ghwm-a11y *,
.ghwm-a11y *::before,
.ghwm-a11y *::after {
  box-sizing: border-box;
}

.ghwm-a11y [hidden] {
  display: none !important;
}

.ghwm-a11y button {
  font-weight: 700 !important;
  font: inherit;
  cursor: pointer;
  touch-action: manipulation;
}

.ghwm-a11y button:focus-visible,
.ghwm-a11y__panel:focus-visible {
  outline: 3px solid var(--a11y-focus);
  outline-offset: 3px;
}

/* Floating button */

.ghwm-a11y__trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--a11y-navy);
  color: #fff;
  box-shadow: 0 4px 16px rgb(7 26 48 / 30%);
}

.ghwm-a11y__trigger:hover {
  background: var(--a11y-green);
}

.ghwm-a11y__trigger svg {
  display: block;
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Panel: fixed position prevents movement when display modes change */

.ghwm-a11y__panel {
  position: fixed;
  right: 24px;
  bottom: 152px;
  display: flex;
  flex-direction: column;
  width: min(390px, calc(100vw - 32px));
  max-height: min(72vh, 640px);
  max-height: min(72dvh, 640px);
  overflow: hidden;
  border: 1px solid var(--a11y-border);
  border-radius: 12px;
  background: #fff;
  color: var(--a11y-text);
  box-shadow: 0 12px 36px rgb(7 26 48 / 25%);
  letter-spacing: normal;
  word-spacing: normal;
  filter: none !important;
}

.ghwm-a11y__panel[hidden] {
  display: none !important;
}

.ghwm-a11y__header {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border-bottom: 1px solid var(--a11y-border);
}

.ghwm-a11y__header h2 {
  margin: 0 0 5px;
  color: var(--a11y-navy);
  font-size: 21px;
  line-height: 1.3;
}

.ghwm-a11y__header p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.ghwm-a11y__close {
  display: inline-flex;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--a11y-border);
  border-radius: 6px;
  background: #fff;
  color: var(--a11y-text);
  font-size: 28px !important;
  line-height: 1;
}

.ghwm-a11y__content {
  min-height: 0;
  padding: 16px 18px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.ghwm-a11y__group {
  margin: 0 0 18px;
  padding: 0 0 16px;
  border-bottom: 1px solid var(--a11y-border);
}

.ghwm-a11y__group h3 {
  margin: 0 0 10px;
  color: var(--a11y-navy);
  font-size: 16px;
  line-height: 1.4;
}

.ghwm-a11y__font-controls {
  display: grid;
  grid-template-columns: 44px minmax(50px, 1fr) 44px;
  align-items: center;
  gap: 8px;
}

.ghwm-a11y__font-controls output {
  text-align: center;
  font-weight: 700;
}

.ghwm-a11y__font-controls button,
.ghwm-a11y__speech-controls button {
  min-height: 44px;
  padding: 8px 10px;
  border: 1px solid #7b8999;
  border-radius: 6px;
  background: #fff;
  color: var(--a11y-text);
}

.ghwm-a11y__font-controls button:last-child {
  grid-column: 1 / -1;
}

.ghwm-a11y__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  margin: 0 0 8px;
  padding: 10px 12px;
  border: 1px solid #7b8999;
  border-radius: 6px;
  background: #fff;
  color: var(--a11y-text);
  text-align: left;
}

.ghwm-a11y__toggle [data-a11y-status] {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
}

.ghwm-a11y__toggle[aria-pressed="true"] {
  border-color: var(--a11y-navy);
  background: var(--a11y-navy);
  color: #fff;
}

.ghwm-a11y__toggle:hover,
.ghwm-a11y__font-controls button:hover,
.ghwm-a11y__speech-controls button:hover {
  border-color: var(--a11y-navy);
}

.ghwm-a11y__speech-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.ghwm-a11y__status {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.5;
}

.ghwm-a11y__reset {
  flex: 0 0 auto;
  min-height: 48px;
  margin: 0 18px 18px;
  padding: 10px 14px;
  border: 2px solid var(--a11y-navy);
  border-radius: 6px;
  background: #fff;
  color: var(--a11y-navy);
  font-weight: 700 !important;
}

.ghwm-a11y__reset:hover {
  background: var(--a11y-navy);
  color: #fff;
}

/* High contrast */

html.ghwm-a11y-high-contrast body {
  background: #fff !important;
  color: #000 !important;
}

html.ghwm-a11y-high-contrast body :where(
  h1, h2, h3, h4, h5, h6, p, li, dt, dd, label,
  small, figcaption, blockquote, legend
) {
  color: #000 !important;
}

html.ghwm-a11y-high-contrast body a {
  color: #0037b8 !important;
  text-decoration: underline !important;
}

html.ghwm-a11y-high-contrast body button,
html.ghwm-a11y-high-contrast body input,
html.ghwm-a11y-high-contrast body select,
html.ghwm-a11y-high-contrast body textarea {
  border-color: #000 !important;
}

/* Invert page containers, not body or the accessibility widget.
   This avoids changing the panel's fixed-position containing block. */

html.ghwm-a11y-invert-colors body > :not(.ghwm-a11y) {
  filter: invert(1) hue-rotate(180deg);
}

/* Restore original appearance of images inside inverted containers */

html.ghwm-a11y-invert-colors body > :not(.ghwm-a11y) img,
html.ghwm-a11y-invert-colors body > :not(.ghwm-a11y) video,
html.ghwm-a11y-invert-colors body > :not(.ghwm-a11y) canvas {
  filter: invert(1) hue-rotate(180deg);
}

/* Highlight links */

html.ghwm-a11y-highlight-links body a {
  outline: 2px solid #a33b00 !important;
  outline-offset: 3px !important;
  text-decoration: underline !important;
  text-decoration-thickness: 2px !important;
}

/* Disable foreground images and CSS background images */

html.ghwm-a11y-disable-images body img,
html.ghwm-a11y-disable-images body picture,
html.ghwm-a11y-disable-images body video,
html.ghwm-a11y-disable-images body canvas {
  visibility: hidden !important;
}

html.ghwm-a11y-disable-images body :not(.ghwm-a11y):not(.ghwm-a11y *) {
  background-image: none !important;
}

html.ghwm-a11y-disable-images body *::before,
html.ghwm-a11y-disable-images body *::after {
  background-image: none !important;
}

/* Big cursor: large black-and-white cursor for common browsers */

.ghwm-a11y.ghwm-a11y--big-cursor {
  cursor: auto;
}

html.ghwm-a11y-big-cursor,
html.ghwm-a11y-big-cursor body,
html.ghwm-a11y-big-cursor body * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M6 3 L6 37 L15 28 L22 43 L29 40 L22 25 L36 25 Z' fill='white' stroke='black' stroke-width='3'/%3E%3C/svg%3E") 6 3, auto !important;
}

/* Preserve the normal pointer inside the settings panel */

html.ghwm-a11y-big-cursor .ghwm-a11y__panel,
html.ghwm-a11y-big-cursor .ghwm-a11y__panel * {
  cursor: pointer;
}

html.ghwm-a11y-big-cursor .ghwm-a11y__content {
  cursor: auto;
}

/* Text spacing and line height */

html.ghwm-a11y-text-spacing body :where(
  p, li, dd, dt, label, blockquote
) {
  letter-spacing: 0.12em !important;
  word-spacing: 0.16em !important;
}

html.ghwm-a11y-line-height body :where(
  p, li, dd, dt, label, blockquote
) {
  line-height: 2 !important;
}

/* Mobile */

@media (max-width: 600px) {
  .ghwm-a11y {
    right: 16px;
    bottom: 76px;
  }

  .ghwm-a11y__trigger {
    width: 48px;
    height: 48px;
  }

  .ghwm-a11y__panel {
    right: 12px;
    bottom: 134px;
    width: calc(100vw - 24px);
    max-height: calc(100vh - 150px);
    max-height: calc(100dvh - 150px);
  }
}

@media (max-width: 360px) {
  .ghwm-a11y {
    right: 10px;
    bottom: 68px;
  }

  .ghwm-a11y__panel {
    right: 8px;
    bottom: 120px;
    width: calc(100vw - 16px);
  }

  .ghwm-a11y__header,
  .ghwm-a11y__content {
    padding-right: 12px;
    padding-left: 12px;
  }

  .ghwm-a11y__speech-controls {
    grid-template-columns: 1fr;
  }
}

/* Forced colors */

@media (forced-colors: active) {
  .ghwm-a11y__trigger,
  .ghwm-a11y__panel,
  .ghwm-a11y button {
    border: 1px solid ButtonText;
    box-shadow: none;
  }

  .ghwm-a11y__trigger,
  .ghwm-a11y__toggle,
  .ghwm-a11y__reset,
  .ghwm-a11y__font-controls button,
  .ghwm-a11y__speech-controls button {
    background: ButtonFace;
    color: ButtonText;
  }

  .ghwm-a11y__panel {
    background: Canvas;
    color: CanvasText;
  }

  .ghwm-a11y button:focus-visible {
    outline: 3px solid Highlight;
  }
}




/* =========================================================
   GHWM ACCESSIBILITY WIDGET — HIGH ZOOM / NARROW VIEWPORTS
   Add at the VERY END of accessibility.css
   ========================================================= */

/* Narrow viewport */
@media screen and (max-width: 700px) {
  .ghwm-a11y {
    right: 12px !important;
    bottom: 68px !important;
  }

  .ghwm-a11y__trigger {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 7px !important;
    border-width: 2px !important;
    box-shadow: 0 2px 8px rgba(7, 26, 48, 0.22) !important;
  }

  .ghwm-a11y__trigger svg {
    width: 25px !important;
    height: 25px !important;
  }

  .ghwm-a11y__panel {
    right: 8px !important;
    bottom: 122px !important;
    width: calc(100vw - 16px) !important;
    max-width: 390px !important;
    max-height: calc(100vh - 140px) !important;
    max-height: calc(100dvh - 140px) !important;
  }
}

/* Very narrow viewport — common at 400% zoom */
@media screen and (max-width: 450px) {
  .ghwm-a11y {
    right: 8px !important;
    bottom: 60px !important;
  }

  .ghwm-a11y__trigger {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    padding: 6px !important;
  }

  .ghwm-a11y__trigger svg {
    width: 23px !important;
    height: 23px !important;
  }

  .ghwm-a11y__panel {
    right: 6px !important;
    bottom: 110px !important;
    width: calc(100vw - 12px) !important;
    max-height: calc(100vh - 122px) !important;
    max-height: calc(100dvh - 122px) !important;
  }
}

/* Extra narrow viewport */
@media screen and (max-width: 350px) {
  .ghwm-a11y {
    right: 6px !important;
    bottom: 54px !important;
  }

  .ghwm-a11y__trigger {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    padding: 5px !important;
  }

  .ghwm-a11y__trigger svg {
    width: 21px !important;
    height: 21px !important;
  }

  .ghwm-a11y__panel {
    right: 4px !important;
    bottom: 100px !important;
    width: calc(100vw - 8px) !important;
    padding: 0 !important;
  }

  .ghwm-a11y__header {
    padding: 12px !important;
  }

  .ghwm-a11y__content {
    padding: 12px !important;
  }

  .ghwm-a11y__header h2 {
    font-size: 18px !important;
  }

  .ghwm-a11y__speech-controls {
    grid-template-columns: 1fr !important;
  }
}



/* =========================================================
   GHWM ACCESSIBILITY WIDGET
   RESPONSIVE FIX FOR 200% / 400% ZOOM
   Add at the END of accessibility.css
   ========================================================= */

/* Keep the widget typography independent from website font scaling */
.ghwm-a11y {
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
  letter-spacing: normal !important;
  word-spacing: normal !important;
}

.ghwm-a11y,
.ghwm-a11y * {
  box-sizing: border-box !important;
}

/* Compact panel header */
.ghwm-a11y__header {
  flex-shrink: 0 !important;
  align-items: flex-start !important;
  gap: 8px !important;
  padding: 12px 14px !important;
}

.ghwm-a11y__header h2 {
  margin: 0 0 4px !important;
  font-size: 18px !important;
  line-height: 1.3 !important;
  overflow-wrap: anywhere !important;
}

.ghwm-a11y__header p {
  margin: 0 !important;
  font-size: 12px !important;
  line-height: 1.45 !important;
}

.ghwm-a11y__close {
  flex: 0 0 40px !important;
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  padding: 0 !important;
  font-size: 24px !important;
}

/* Compact section headings and controls */
.ghwm-a11y__content {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 12px 14px !important;
}

.ghwm-a11y__group {
  margin-bottom: 12px !important;
  padding-bottom: 10px !important;
}

.ghwm-a11y__group h3 {
  margin-bottom: 7px !important;
  font-size: 14px !important;
  line-height: 1.4 !important;
}

.ghwm-a11y__toggle {
  min-height: 40px !important;
  margin-bottom: 6px !important;
  padding: 8px 10px !important;
  gap: 8px !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
}

.ghwm-a11y__toggle [data-a11y-status] {
  font-size: 12px !important;
}

.ghwm-a11y__font-controls button,
.ghwm-a11y__speech-controls button {
  min-height: 40px !important;
  padding: 7px 8px !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
}

.ghwm-a11y__font-controls output {
  font-size: 14px !important;
}

.ghwm-a11y__status {
  font-size: 12px !important;
  line-height: 1.45 !important;
}

/* Reset button stays visible at the bottom of the panel */
.ghwm-a11y__reset {
  flex: 0 0 auto !important;
  min-height: 42px !important;
  margin: 0 14px 12px !important;
  padding: 8px 10px !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
}

/* Narrow effective viewport, including many high-zoom situations */
@media screen and (max-width: 700px) {
  .ghwm-a11y {
    right: 10px !important;
    bottom: 64px !important;
  }

  .ghwm-a11y__trigger {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 7px !important;
  }

  .ghwm-a11y__trigger svg {
    width: 25px !important;
    height: 25px !important;
  }

  .ghwm-a11y__panel {
    position: fixed !important;
    top: 12px !important;
    right: 8px !important;
    bottom: 12px !important;
    left: 8px !important;

    width: auto !important;
    max-width: none !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;

    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;

    transform: none !important;
    filter: none !important;
  }

  .ghwm-a11y__panel[hidden] {
    display: none !important;
  }

  .ghwm-a11y__header {
    padding: 10px 12px !important;
  }

  .ghwm-a11y__header h2 {
    font-size: 17px !important;
  }

  .ghwm-a11y__content {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 10px 12px !important;
  }

  .ghwm-a11y__reset {
    margin: 8px 12px 10px !important;
  }
}

/* Extra narrow viewport */
@media screen and (max-width: 350px) {
  .ghwm-a11y__header h2 {
    font-size: 16px !important;
  }

  .ghwm-a11y__header p {
    font-size: 11px !important;
  }

  .ghwm-a11y__speech-controls {
    grid-template-columns: 1fr !important;
  }

  .ghwm-a11y__toggle {
    font-size: 12px !important;
  }
}

/* Preserve keyboard focus visibility */
.ghwm-a11y button:focus-visible,
.ghwm-a11y__panel:focus-visible {
  outline: 3px solid #005fcc !important;
  outline-offset: 2px !important;
}





/* GHWM Accessibility Button — Compact at High Zoom */

/* Default desktop size */
.ghwm-a11y {
  right: 26px  !important;
  bottom: 78px !important;
}

.ghwm-a11y__trigger {
  width: 48px !important;
  height: 48px !important;
  min-width: 48px !important;
  min-height: 48px !important;
  padding: 7px !important;
}

.ghwm-a11y__trigger svg {
  width: 26px !important;
  height: 26px !important;
}

/* Narrow viewport: often encountered at 200%–400% zoom */
@media screen and (max-width: 700px) {
  .ghwm-a11y {
    right: 10px !important;
    bottom: 58px !important;
  }

  .ghwm-a11y__trigger {
    width: 38px !important;
    height: 38px !important;
    min-width: 38px !important;
    min-height: 38px !important;
    padding: 5px !important;
    border-width: 2px !important;
    box-shadow: 0 2px 7px rgba(7, 26, 48, 0.22) !important;
  }

  .ghwm-a11y__trigger svg {
    width: 22px !important;
    height: 22px !important;
  }
}

/* Extra narrow viewport */
@media screen and (max-width: 400px) {
  .ghwm-a11y {
    right: 16px !important;
    bottom: 55px !important;
  }

  .ghwm-a11y__trigger {
   width: 35px !important;
        height: 35px !important;
        min-width: 35px !important;
        min-height: 32px !important;
    padding: 4px !important;
  }

  .ghwm-a11y__trigger svg {
    width: 20px !important;
    height: 20px !important;
  }
}

/* Preserve visible keyboard focus */
.ghwm-a11y__trigger:focus-visible {
  outline: 3px solid #005fcc !important;
  outline-offset: 2px !important;
}
