/* Hamlin County — Accessibility Preferences (the round button on the right of every page).
   The settings are classes on <html>, set before the page draws (inc/layout.php) and by assets/a11y.js.
   Nothing here touches the tool itself (#a11y-root), so it always stays readable. */

/* ---------- The button and panel ---------- */
#a11y-root { --a-navy: #0F2A44; --a-blue: #1E4F92; --a-wheat: #D8A84A; --a-line: #D5DBE2; --a-tile: #F1F4F8;
  font-family: 'Public Sans', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif; font-size: 16px; line-height: 1.4;
  letter-spacing: normal; word-spacing: normal; text-align: left; color: #18212C; }
#a11y-root *, #a11y-root *::before, #a11y-root *::after { box-sizing: border-box; }
#a11y-open { position: fixed; right: 14px; top: 50%; transform: translateY(-50%); z-index: 10001; width: 60px; height: 60px; padding: 0;
  border-radius: 50%; border: 3px solid #fff; background: var(--a-navy); color: #fff; cursor: pointer;
  box-shadow: 0 0 0 3px var(--a-navy), 0 6px 18px rgba(0,0,0,.25); display: grid; place-items: center; }
#a11y-open:hover { background: var(--a-blue); box-shadow: 0 0 0 3px var(--a-blue), 0 6px 18px rgba(0,0,0,.25); }
#a11y-open:focus-visible { outline: 4px solid var(--a-wheat); outline-offset: 4px; }
#a11y-open svg { width: 38px; height: 38px; display: block; }
#a11y-open[aria-expanded="true"] { display: none; }

#a11y-panel { position: fixed; top: 12px; right: 12px; bottom: 12px; z-index: 10002; width: 400px; max-width: calc(100vw - 24px);
  background: #fff; border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.35); display: flex; flex-direction: column; overflow: hidden; }
#a11y-panel[hidden] { display: none; }
#a11y-root.is-big #a11y-panel { zoom: 1.22; width: 420px; max-width: calc((100vw - 24px) / 1.22); max-height: calc((100vh - 24px) / 1.22); bottom: auto; height: calc((100vh - 24px) / 1.22); }
.a11y-head { background: var(--a-navy); color: #fff; padding: 14px 16px; display: flex; align-items: center; gap: 12px; flex: none; }
.a11y-close { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 2px solid #fff; background: transparent; color: #fff; cursor: pointer; display: grid; place-items: center; padding: 0; }
.a11y-close:hover { background: rgba(255,255,255,.15); }
.a11y-close svg { width: 22px; height: 22px; }
.a11y-title { margin: 0; font-size: 19px; font-weight: 700; color: #fff; }
.a11y-keys { margin: 2px 0 0; font-size: 14px; color: #DCE6F2; }
.a11y-body { flex: 1; overflow-y: auto; padding: 16px; background: #F6F8FB; }
.a11y-statement { display: flex; align-items: center; justify-content: center; gap: 8px; background: var(--a-navy); color: #fff !important;
  border-radius: 8px; padding: 11px 14px; font-weight: 700; text-decoration: none; margin-bottom: 14px; }
.a11y-statement:hover { background: var(--a-blue); }
.a11y-statement svg { width: 18px; height: 18px; flex: none; }
.a11y-card { background: #fff; border: 1px solid var(--a-line); border-radius: 12px; padding: 12px; }
.a11y-switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 4px 14px; margin-bottom: 12px; border-bottom: 1px solid var(--a-line); }
.a11y-switch-row span { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.a11y-switch-row svg { width: 26px; height: 26px; }
.a11y-switch { flex: none; width: 50px; height: 28px; border-radius: 999px; border: 2px solid #8A96A3; background: #DDE3EA; position: relative; cursor: pointer; padding: 0; }
.a11y-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.35); transition: left .15s; }
.a11y-switch[aria-checked="true"] { background: var(--a-blue); border-color: var(--a-blue); }
.a11y-switch[aria-checked="true"]::after { left: 24px; }
.a11y-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.a11y-tile { min-height: 92px; border: 2px solid transparent; border-radius: 10px; background: var(--a-tile); color: #18212C; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 10px 6px; font: inherit; font-weight: 600; text-align: center; }
.a11y-tile:hover { border-color: #9DB0C6; }
.a11y-tile svg { width: 28px; height: 28px; }
.a11y-tile[aria-pressed="true"] { background: #E3EDFA; border-color: var(--a-blue); color: var(--a-navy); }
.a11y-tile[aria-pressed="true"]::after { content: "On"; font-size: 12px; font-weight: 700; color: #fff; background: var(--a-blue); border-radius: 999px; padding: 1px 8px; }
.a11y-step { min-height: 92px; border-radius: 10px; background: var(--a-tile); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 10px 6px; border: 2px solid transparent; }
.a11y-step.is-changed { background: #E3EDFA; border-color: var(--a-blue); }
.a11y-step-name { font-weight: 600; }
.a11y-step-ctl { display: flex; align-items: center; gap: 10px; }
.a11y-step-ctl button { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--a-navy); color: #fff; cursor: pointer; display: grid; place-items: center; padding: 0; }
.a11y-step-ctl button:hover { background: var(--a-blue); }
.a11y-step-ctl button:disabled { background: #A9B3BF; cursor: default; }
.a11y-step-ctl svg { width: 16px; height: 16px; }
.a11y-step-ctl output { min-width: 46px; text-align: center; font-size: 15px; font-weight: 700; }
.a11y-reset { width: 100%; margin-top: 14px; padding: 11px; border-radius: 8px; border: 2px solid #B42318; background: #fff; color: #B42318; font: inherit; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; }
.a11y-reset:hover { background: #FDECEA; }
.a11y-reset svg { width: 18px; height: 18px; }
.a11y-note { margin: 12px 2px 0; font-size: 13.5px; color: #55606D; }
.a11y-foot { flex: none; background: var(--a-navy); text-align: center; padding: 12px; }
.a11y-foot a { color: #fff !important; font-weight: 600; text-decoration: underline; }
#a11y-root button:focus-visible, #a11y-root a:focus-visible { outline: 3px solid var(--a-wheat); outline-offset: 2px; }
.a11y-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Reading mask: the page is dimmed except a band that follows the pointer (or the keyboard focus). */
.a11y-mask { position: fixed; left: 0; right: 0; z-index: 10000; background: rgba(0, 0, 0, .62); pointer-events: none; }
.a11y-mask-top { top: 0; } .a11y-mask-bottom { bottom: 0; }
.a11y-mask[hidden] { display: none; }
/* Text magnifier: whatever text the pointer is over (or has keyboard focus) shown large near the bottom of the screen. */
.a11y-magnifier { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 10003; max-width: min(900px, calc(100vw - 32px));
  background: #0B1F33; color: #fff; font-size: 30px; line-height: 1.35; font-weight: 600; padding: 14px 20px; border-radius: 10px; border: 3px solid #D8A84A;
  box-shadow: 0 8px 30px rgba(0,0,0,.4); pointer-events: none; overflow-wrap: anywhere; }
.a11y-magnifier[hidden] { display: none; }

@media (max-width: 640px) {
  #a11y-open { top: auto; bottom: 14px; transform: none; width: 54px; height: 54px; }
  #a11y-open svg { width: 34px; height: 34px; }
  #a11y-panel { top: 0; right: 0; bottom: 0; max-width: 100vw; width: 100vw; border-radius: 0; }
  #a11y-root.is-big #a11y-panel { width: calc(100vw / 1.22); max-width: none; height: calc(100vh / 1.22); }
  .a11y-magnifier { font-size: 24px; bottom: 80px; }
}
@media print { #a11y-root { display: none !important; } }

/* ---------- What the settings do to the page ---------- */
/* Content scaling: everything on the page larger or smaller (zoom), except the tool. */
html.a11y-scale body > *:not(#a11y-root) { zoom: var(--a11y-scale, 1); }

/* Letter spacing (and word spacing with it). */
html.a11y-ls body *:not(#a11y-root, #a11y-root *) { letter-spacing: var(--a11y-ls) !important; word-spacing: var(--a11y-ws) !important; }

/* Readable font: Atkinson Hyperlegible (made for low vision), or Verdana until it loads. */
html.a11y-readable body *:not(#a11y-root, #a11y-root *) { font-family: 'Atkinson Hyperlegible', Verdana, Tahoma, Arial, sans-serif !important; }

/* Text alignment. */
html.a11y-align-left body *:not(#a11y-root, #a11y-root *) { text-align: left !important; }
html.a11y-align-center body *:not(#a11y-root, #a11y-root *) { text-align: center !important; }
html.a11y-align-right body *:not(#a11y-root, #a11y-root *) { text-align: right !important; }

/* High contrast: black background, white text, yellow links. Photos stay; background pictures go. */
html.a11y-contrast, html.a11y-contrast body { background: #000 !important; }
html.a11y-contrast body *:not(#a11y-root, #a11y-root *, img, svg, svg *, video, picture) {
  background-color: #000 !important; background-image: none !important; color: #fff !important; border-color: #fff !important;
  box-shadow: none !important; text-shadow: none !important; }
html.a11y-contrast body a:not(#a11y-root a), html.a11y-contrast body a:not(#a11y-root a) * { color: #FFE34D !important; }
html.a11y-contrast body a:not(#a11y-root a) { text-decoration: underline !important; }
html.a11y-contrast body button:not(#a11y-root button), html.a11y-contrast body input:not([type=checkbox]):not([type=radio]),
html.a11y-contrast body select, html.a11y-contrast body textarea { border: 2px solid #fff !important; }
html.a11y-contrast body svg:not(#a11y-root svg) { color: #fff !important; }
html.a11y-contrast body :focus-visible { outline: 3px solid #FFE34D !important; }

/* Hide images (photos, logos, video). Small line icons stay so buttons still make sense. */
html.a11y-noimg body img:not(#a11y-root img), html.a11y-noimg body picture, html.a11y-noimg body video,
html.a11y-noimg body .about-photos, html.a11y-noimg body .release-photo { display: none !important; }
html.a11y-noimg body *:not(#a11y-root, #a11y-root *) { background-image: none !important; }

/* Highlight links. */
html.a11y-links body a:not(#a11y-root a) { background: #FFF1A8 !important; color: #0B1F3A !important; text-decoration: underline !important;
  text-decoration-thickness: 2px !important; outline: 2px solid #1E4F92 !important; outline-offset: 1px; border-radius: 2px; }
html.a11y-links body a:not(#a11y-root a) * { color: #0B1F3A !important; }

/* Highlight titles (headings). */
html.a11y-titles body :is(h1, h2, h3, h4, h5, h6):not(#a11y-root *) { outline: 3px dashed #D8A84A !important; outline-offset: 4px; background: rgba(216, 168, 74, .14) !important; }
html.a11y-titles.a11y-contrast body :is(h1, h2, h3, h4, h5, h6):not(#a11y-root *) { outline-color: #FFE34D !important; }
