/* Accessibility preferences (P8). Every option is a class on <html>, set before paint
   so nothing flashes, and the widget itself stays usable while they are on. */

/* ---------- text size ---------- */
html.a11y-fs-110{font-size:110%}
html.a11y-fs-125{font-size:125%}
html.a11y-fs-150{font-size:150%}

/* ---------- high contrast ---------- */
html.a11y-contrast body{background:#fff;color:#101418}
html.a11y-contrast :is(p,li,span,td,th,dd,dt,blockquote,figcaption,label,legend,small){color:#101418}
html.a11y-contrast :is(h1,h2,h3,h4,h5,h6){color:#06120a}
html.a11y-contrast a:not(.btn):not([class*="-btn"]){color:#0a4b2a;text-decoration:underline}
html.a11y-contrast :is(.btn-green,.tr-btn-primary,.pt-submit,.cat-apply-btn,.acc-btn-primary,.bl-btn){background:#0a4b2a;color:#fff;border-color:#0a4b2a}
html.a11y-contrast :is(.wy-input,.wy-select,.wy-textarea,input,select,textarea){border-color:#101418;color:#101418;background:#fff}
html.a11y-contrast :is(.card,.tr-card,.pt-card,.cat-card,.bl-card,.acc-card){border-color:#101418}

/* ---------- highlight links ---------- */
html.a11y-links a:not(.skip-link){text-decoration:underline;text-underline-offset:3px;outline:1px dashed currentColor;outline-offset:2px}

/* ---------- readable font and spacing ---------- */
html.a11y-readable body{font-family:Tahoma,"Segoe UI",Arial,sans-serif;letter-spacing:.02em;word-spacing:.08em}
html.a11y-readable :is(p,li,dd,blockquote){line-height:2.05}
html.a11y-readable :is(h1,h2,h3){line-height:1.7}

/* ---------- stop motion ---------- */
html.a11y-no-motion *,html.a11y-no-motion *::before,html.a11y-no-motion *::after{
  animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important;scroll-behavior:auto!important}

/* ---------- greyscale ---------- */
html.a11y-gray body{filter:grayscale(1)}

/* ---------- large pointer ---------- */
html.a11y-cursor,html.a11y-cursor *{cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 40 40'%3E%3Cpath d='M6 2l26 15-11 3 6 13-5 3-6-13-8 8z' fill='%23111' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") 4 2,auto}

/* ---------- the widget ---------- */
.a11y-fab{position:fixed;inset-inline-end:18px;bottom:18px;z-index:80;width:52px;height:52px;border:0;border-radius:50%;background:var(--accent,#1a7f4b);color:#fff;font-size:1.5rem;display:grid;place-items:center;cursor:pointer;box-shadow:0 8px 24px rgba(16,40,28,.28)}
.a11y-fab:hover{background:var(--accent-d,#14663c)}
.a11y-panel{position:fixed;inset-inline-end:18px;bottom:82px;z-index:81;width:min(340px,calc(100vw - 36px));max-height:min(70vh,560px);overflow:auto;background:#fff;border:1px solid #e4e8ec;border-radius:16px;box-shadow:0 18px 48px rgba(16,40,28,.22);padding:1rem}
.a11y-panel[hidden]{display:none}
.a11y-head{display:flex;align-items:center;justify-content:space-between;gap:.5rem;margin-bottom:.8rem}
.a11y-head h2{font-size:1rem;font-weight:800;color:var(--ink,#1f2937)}
.a11y-close{width:32px;height:32px;border:1px solid #e4e8ec;border-radius:8px;background:#fff;color:#5b6270;cursor:pointer;display:grid;place-items:center}
.a11y-close:hover{border-color:var(--accent,#1a7f4b);color:var(--accent,#1a7f4b)}
.a11y-group{margin-bottom:.9rem}
.a11y-group h3{font-size:.82rem;font-weight:700;color:#5b6270;margin-bottom:.45rem}
.a11y-sizes{display:flex;gap:.4rem}
.a11y-size{flex:1;height:38px;border:1px solid #e4e8ec;border-radius:8px;background:#fff;color:var(--ink,#1f2937);font-family:inherit;font-weight:700;cursor:pointer}
.a11y-size[aria-pressed="true"]{background:var(--accent-l,#e8f5ee);border-color:var(--accent,#1a7f4b);color:#0b5c38}
.a11y-toggle{display:flex;align-items:center;justify-content:space-between;gap:.6rem;width:100%;padding:.55rem .6rem;border:1px solid transparent;border-radius:10px;background:#fff;color:var(--ink,#1f2937);font-family:inherit;font-size:.88rem;text-align:start;cursor:pointer}
.a11y-toggle:hover{background:#f4f8f6}
.a11y-toggle[aria-pressed="true"]{background:var(--accent-l,#e8f5ee);border-color:var(--accent,#1a7f4b);color:#0b5c38;font-weight:700}
.a11y-toggle i{font-size:1.05rem}
.a11y-toggle .state{font-size:.75rem;color:#5b6270}
.a11y-toggle[aria-pressed="true"] .state{color:#0b5c38}
.a11y-reset{width:100%;height:40px;margin-top:.4rem;border:1px solid #e4e8ec;border-radius:8px;background:#fff;color:#5b6270;font-family:inherit;font-weight:700;cursor:pointer}
.a11y-reset:hover{border-color:#c02f2f;color:#c02f2f}
.a11y-note{margin-top:.7rem;font-size:.76rem;color:#5b6270;line-height:1.7}

@media print{ .a11y-fab,.a11y-panel{display:none} }
