/* The Accessibility button and panel (static/assets/js/a11y.js, static/assets/js/a11y-early.js).
   Same options and behaviour as MyListingLingo's public/a11y.css, styled for the Architectural Modern design.
   Nothing below changes the page until the visitor turns an option on (classes on <html>), or their own system asks for
   reduced motion or more contrast. */

/* Atkinson Hyperlegible (Braille Institute; SIL Open Font License), self-hosted. The browser downloads it only when
   "Readable font" is on, because nothing else uses it. */
@font-face{font-family:"Atkinson Hyperlegible";font-style:normal;font-weight:400;font-display:swap;src:url(/assets/fonts/atkinson-hyperlegible-latin-400-normal.woff2) format("woff2")}
@font-face{font-family:"Atkinson Hyperlegible";font-style:normal;font-weight:700;font-display:swap;src:url(/assets/fonts/atkinson-hyperlegible-latin-700-normal.woff2) format("woff2")}

/* ---- WCAG 2.4.11 Focus Not Obscured: when the keyboard moves the page, keep the focused item clear of the floating
   button in the lower left ---- */
html{scroll-padding-bottom:84px}
/* where the footer's last line would sit under the button at the very end of the page, give it room */
@media (max-width:1439.98px){.footer{padding-bottom:84px}}

/* ---- the button: a small person icon in the lower left ---- */
.a11y-btn{position:fixed;left:16px;bottom:calc(16px + env(safe-area-inset-bottom,0px));z-index:70;display:inline-grid;place-items:center;width:44px;height:44px;margin:0;padding:0;border:2px solid #fff;border-radius:50%;background:var(--olive);color:#fff;box-shadow:0 6px 16px -6px rgba(27,29,26,.5);cursor:pointer}
.a11y-btn:hover{background:var(--hover)}
.a11y-btn svg{width:26px;height:26px}
.a11y-btn:focus-visible{outline:3px solid var(--focus);outline-offset:3px;box-shadow:0 0 0 3px #fff}

/* ---- the panel ---- */
.a11y-panel{position:fixed;left:16px;bottom:calc(72px + env(safe-area-inset-bottom,0px));z-index:71;box-sizing:border-box;width:min(330px,calc(100vw - 32px));max-height:calc(100vh - 96px);overflow-y:auto;padding:20px 20px 16px;border:1px solid var(--line);border-radius:2px;background:var(--surface);color:var(--ink);font:400 16px/1.5 var(--body);text-align:left;box-shadow:0 18px 40px -14px rgba(27,29,26,.35)}
.a11y-panel[hidden]{display:none}
.a11y-panel h2{margin:0 40px 12px 0;font:600 22px/1.25 var(--display);letter-spacing:-.02em}
.a11y-panel h2:focus{outline:none}
.a11y-panel .a11y-x{position:absolute;top:10px;right:10px;width:40px;height:40px;margin:0;padding:0;border:0;border-radius:2px;background:transparent;color:inherit;font-size:24px;line-height:1;cursor:pointer}
.a11y-panel .a11y-x:hover{background:var(--tint)}
.a11y-panel .a11y-say{margin:0 0 8px;font-weight:600;max-width:none}
.a11y-panel .a11y-size{display:flex;gap:8px;margin:0 0 16px}
.a11y-panel button.a11y-opt,.a11y-panel .a11y-size button,.a11y-panel .a11y-reset{box-sizing:border-box;min-height:44px;margin:0;padding:8px 12px;border:1px solid var(--border);border-radius:2px;background:var(--surface);color:var(--ink);font:inherit;font-weight:600;cursor:pointer}
.a11y-panel .a11y-size button{flex:1}
.a11y-panel .a11y-size button:disabled{color:var(--muted);border-style:dashed;cursor:not-allowed}
.a11y-panel button.a11y-opt{display:flex;align-items:center;justify-content:space-between;width:100%;margin:0 0 8px;text-align:left}
.a11y-panel button:not(:disabled):hover{background:var(--tint)}
.a11y-panel .a11y-state{flex:none;min-width:44px;margin-left:12px;padding:2px 8px;border:1px solid var(--border);border-radius:999px;font-size:14px;text-align:center}
.a11y-panel button.a11y-opt[aria-pressed="true"]{border:2px solid var(--olive);padding:7px 11px}
.a11y-panel button.a11y-opt[aria-pressed="true"] .a11y-state{border-color:var(--olive);background:var(--olive);color:#fff}
.a11y-panel .a11y-reset{width:100%;margin-top:4px}
.a11y-panel .a11y-note{margin:12px 0 0;font-size:14px;color:var(--muted);max-width:none}
.a11y-panel .a11y-note a{color:var(--olive);text-decoration:underline;text-underline-offset:3px;display:inline-block;padding-block:2px}
.a11y-panel button:focus-visible,.a11y-panel a:focus-visible{outline:3px solid var(--focus);outline-offset:2px}
.a11y-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* ---- Bigger / smaller text: the page's own areas grow or shrink like a browser zoom (the site's sizes are fixed
   pixels, so a zoom keeps every proportion of the approved design) ---- */
html.a11y-small :is(body>.site-header,body>main,body>footer){zoom:.9}
html.a11y-big1 :is(body>.site-header,body>main,body>footer){zoom:1.15}
html.a11y-big2 :is(body>.site-header,body>main,body>footer){zoom:1.3}

/* ---- Readable font ---- */
html.a11y-font :is(body>.site-header,body>main,body>footer,.a11y-panel),
html.a11y-font :is(body>.site-header,body>main,body>footer,.a11y-panel) *{font-family:"Atkinson Hyperlegible",Verdana,"Segoe UI",system-ui,sans-serif!important;letter-spacing:.01em;word-spacing:.06em}

/* ---- Underline links ---- */
html.a11y-links a:not(.a11y-btn){text-decoration:underline!important;text-underline-offset:.15em}

/* ---- Reduce motion (on by default when the system asks for it, see a11y-early.js) ---- */
html.a11y-motion,html.a11y-motion *,html.a11y-motion *::before,html.a11y-motion *::after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important;transition-delay:0s!important;scroll-behavior:auto!important}

/* ---- High contrast: black text on white (at least 7:1), black lines and 2 px borders, underlined dark-blue links,
   filled buttons black with white text, no shadows; photos untouched. On by default when the system asks for more
   contrast (a11y-early.js). ---- */
html.a11y-hc{--bg:#fff;--surface:#fff;--tint:#fff;--ink:#000;--muted:#000;--olive:#000;--hover:#000;--line:#000;--border:#000;--focus:#0b3a8c;--error:#8b0000;--success:#0b5323}
html.a11y-hc body{background:#fff;color:#000}
html.a11y-hc .footer{border-top:2px solid #000}
html.a11y-hc .search-band{border-block:2px solid #000}
html.a11y-hc :is(.site-header,.paths article+article,.hero-aside,.inner-photo,.journey-row,.step,.cta,.closing,.resource-section,.resource-grid article,.privacy,.featured-post,.article-sources,.article-nav,.footer-bottom,.process,.how-steps li,.switch-row,.bio-facts){border-color:#000!important}
html.a11y-hc a:not(.button,.brand,.a11y-btn){color:#0b3a8c!important;text-decoration:underline!important;text-underline-offset:.15em}
html.a11y-hc .button{background:#000!important;border:2px solid #000!important;color:#fff!important}
html.a11y-hc .button.secondary{background:#fff!important;color:#000!important}
html.a11y-hc :is(input,select,textarea,.wish-form,.contact-grid form,.search-panel,.admin-form,.article-cta,.form-alert,.error-summary,.a11y-panel button,.a11y-panel){border:2px solid #000!important}
html.a11y-hc :is(.form-success,.help-panel,.portrait){border:2px solid #000!important;background:#fff!important}
html.a11y-hc .a11y-panel button.a11y-opt[aria-pressed="true"]{background:#000!important;color:#fff!important}
html.a11y-hc .a11y-panel button.a11y-opt[aria-pressed="true"] .a11y-state{background:#fff!important;color:#000!important;border-color:#fff!important}
html.a11y-hc .a11y-btn{background:#000;border-color:#fff;outline:2px solid #000}
html.a11y-hc :is(.a11y-panel,.a11y-btn){box-shadow:none!important}
html.a11y-hc input.switch:checked{background:#000;border-color:#000}
html.a11y-hc [aria-current="page"]{text-decoration-thickness:3px!important}
