/* ===== WCAG Sentinel accessibility widget ===== */
.wcags-widget { --wcags-accent: #1a4b8c; position: fixed; bottom: 20px; z-index: 2147483000; font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: #111; }
.wcags-widget-right { right: 20px; }
.wcags-widget-left { left: 20px; }

.wcags-w-toggle { display: inline-flex; align-items: center; gap: 10px; background: var(--wcags-accent); color: #fff; border: 3px solid #fff; border-radius: 999px; padding: 10px 18px; min-height: 56px; font: inherit; font-weight: 700; cursor: pointer; box-shadow: 0 4px 16px rgba(0,0,0,.35); transition: transform .15s; }
.wcags-w-toggle.wcags-w-icon-only { width: 56px; height: 56px; padding: 0; justify-content: center; }
.wcags-w-toggle:hover { transform: scale(1.06); }
.wcags-w-toggle:focus-visible, .wcags-w-panel button:focus-visible, .wcags-w-panel a:focus-visible { outline: 3px solid #ffbf47; outline-offset: 3px; }
.wcags-w-toggle.wcags-w-active::after { content: attr(data-count); position: absolute; top: -6px; right: -6px; background: #d63638; color: #fff; font-size: 12px; min-width: 22px; height: 22px; border-radius: 999px; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; }
.wcags-w-toggle { position: relative; }

.wcags-w-panel { position: absolute; bottom: 70px; width: 380px; max-width: calc(100vw - 24px); max-height: calc(100vh - 110px); background: #fff; color: #111; border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.35); display: flex; flex-direction: column; overflow: hidden; text-align: left; }
.wcags-widget-right .wcags-w-panel { right: 0; }
.wcags-widget-left .wcags-w-panel { left: 0; }
.wcags-w-panel[hidden] { display: none; }
.wcags-w-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 14px; background: var(--wcags-accent); color: #fff; }
.wcags-w-head h2 { margin: 0; font-size: 18px; font-weight: 700; color: #fff; }
.wcags-w-head-actions { display: flex; gap: 6px; align-items: center; }
.wcags-w-reset { background: rgba(255,255,255,.18); color: #fff; border: 1px solid rgba(255,255,255,.6); border-radius: 6px; padding: 6px 10px; font: inherit; font-size: 13px; cursor: pointer; min-height: 36px; }
.wcags-w-close { background: none; border: 0; color: #fff; font-size: 30px; line-height: 1; width: 40px; height: 40px; cursor: pointer; border-radius: 6px; }
.wcags-w-body { overflow-y: auto; padding: 12px 14px 14px; }
.wcags-w-live { margin: 0; min-height: 0; font-size: 13px; color: #1a4b8c; }
.wcags-w-section { margin: 10px 0 14px; }
.wcags-w-section h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 8px; color: #444; font-weight: 700; }
.wcags-w-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wcags-w-grid-toggles { grid-template-columns: 1fr 1fr 1fr; }
.wcags-w-card, .wcags-w-tile { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; background: #f3f5f8; border: 2px solid #e1e5ea; border-radius: 10px; padding: 10px; min-height: 60px; font: inherit; color: #111; cursor: pointer; text-align: left; text-decoration: none; transition: border-color .12s, background .12s; }
.wcags-w-tile { align-items: center; text-align: center; font-size: 13px; font-weight: 600; }
.wcags-w-card:hover, .wcags-w-tile:hover { border-color: var(--wcags-accent); }
.wcags-w-card[aria-pressed="true"], .wcags-w-tile[aria-pressed="true"] { background: var(--wcags-accent); border-color: var(--wcags-accent); color: #fff; }
.wcags-w-card-title { font-weight: 700; font-size: 14px; }
.wcags-w-card-desc { font-size: 12px; opacity: .85; }
.wcags-w-stepper { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid #eef0f3; }
.wcags-w-stepper > span { font-weight: 600; font-size: 14px; }
.wcags-w-stepper > div { display: flex; align-items: center; gap: 6px; }
.wcags-w-stepper button { width: 40px; height: 40px; border-radius: 8px; border: 2px solid var(--wcags-accent); background: #fff; color: var(--wcags-accent); font-size: 22px; font-weight: 700; cursor: pointer; line-height: 1; }
.wcags-w-stepper output { min-width: 70px; text-align: center; font-weight: 600; }
.wcags-w-note { font-size: 12px; color: #555; margin: 8px 0 0; }

@media (max-width: 480px) {
	.wcags-w-grid-toggles { grid-template-columns: 1fr 1fr; }
	.wcags-w-panel { width: calc(100vw - 24px); }
}

/* Reading guide and mask */
.wcags-w-guide { position: fixed; left: 0; right: 0; height: 8px; background: rgba(255, 191, 71, .85); border-top: 2px solid #111; border-bottom: 2px solid #111; pointer-events: none; z-index: 2147482999; }
.wcags-w-mask { position: fixed; left: 0; right: 0; background: rgba(0,0,0,.6); pointer-events: none; z-index: 2147482998; }
.wcags-w-mask-top { top: 0; height: 0; }
.wcags-w-mask-bottom { bottom: 0; top: 100%; }
.wcags-w-guide[hidden], .wcags-w-mask[hidden] { display: none; }

/* ===== Preference effects (applied via classes on <html>) ===== */
html.wcags-size-112 { font-size: 112.5% !important; }
html.wcags-size-125 { font-size: 125% !important; }
html.wcags-size-150 { font-size: 150% !important; }
html.wcags-size-175 { font-size: 175% !important; }
html.wcags-size-200 { font-size: 200% !important; }
html[class*="wcags-size-"] body { font-size: 1em !important; }
html[class*="wcags-size-"] body *:not(.wcags-widget):not(.wcags-widget *) { font-size: inherit; }
html.wcags-size-112 body p, html.wcags-size-125 body p, html.wcags-size-150 body p, html.wcags-size-175 body p, html.wcags-size-200 body p,
html[class*="wcags-size-"] body li, html[class*="wcags-size-"] body td, html[class*="wcags-size-"] body a, html[class*="wcags-size-"] body span, html[class*="wcags-size-"] body label, html[class*="wcags-size-"] body input, html[class*="wcags-size-"] body button { font-size: 1em !important; }
html[class*="wcags-size-"] body h1 { font-size: 2em !important; }
html[class*="wcags-size-"] body h2 { font-size: 1.6em !important; }
html[class*="wcags-size-"] body h3 { font-size: 1.3em !important; }
html[class*="wcags-size-"] body h4, html[class*="wcags-size-"] body h5, html[class*="wcags-size-"] body h6 { font-size: 1.1em !important; }

html.wcags-lh-1-5 body *:not(.wcags-widget):not(.wcags-widget *) { line-height: 1.5 !important; }
html.wcags-lh-1-8 body *:not(.wcags-widget):not(.wcags-widget *) { line-height: 1.8 !important; }
html.wcags-lh-2-2 body *:not(.wcags-widget):not(.wcags-widget *) { line-height: 2.2 !important; }
html.wcags-ls-wide body *:not(.wcags-widget):not(.wcags-widget *) { letter-spacing: .08em !important; word-spacing: .12em !important; }
html.wcags-ls-wider body *:not(.wcags-widget):not(.wcags-widget *) { letter-spacing: .14em !important; word-spacing: .2em !important; }
html.wcags-ls-widest body *:not(.wcags-widget):not(.wcags-widget *) { letter-spacing: .2em !important; word-spacing: .3em !important; }

html.wcags-font body *:not(.wcags-widget):not(.wcags-widget *):not(i):not(.fa):not([class*="icon"]):not([class*="dashicons"]) { font-family: Verdana, "Atkinson Hyperlegible", Arial, Helvetica, sans-serif !important; }
html.wcags-headings body h1, html.wcags-headings body h2, html.wcags-headings body h3, html.wcags-headings body h4, html.wcags-headings body h5, html.wcags-headings body h6 { background: #fff59d !important; color: #111 !important; outline: 2px solid #111 !important; padding: 2px 6px !important; }
html.wcags-links body a:not(.wcags-widget a) { background: #fff59d !important; color: #0000cc !important; text-decoration: underline !important; outline: 2px solid #0000cc !important; }
html.wcags-alignleft body *:not(.wcags-widget):not(.wcags-widget *) { text-align: left !important; }

html.wcags-contrast body { background: #000 !important; color: #fff !important; }
html.wcags-contrast body *:not(img):not(video):not(svg):not(svg *):not(iframe):not(.wcags-widget):not(.wcags-widget *) { background-color: #000 !important; background-image: none !important; color: #fff !important; border-color: #fff !important; box-shadow: none !important; text-shadow: none !important; }
html.wcags-contrast body a, html.wcags-contrast body a * { color: #ffff00 !important; text-decoration: underline !important; }
html.wcags-contrast body button, html.wcags-contrast body input[type=submit], html.wcags-contrast body input[type=button], html.wcags-contrast body .button { background: #fff !important; color: #000 !important; border: 2px solid #ffff00 !important; }
html.wcags-contrast body input, html.wcags-contrast body select, html.wcags-contrast body textarea { background: #000 !important; color: #fff !important; border: 2px solid #fff !important; }
html.wcags-dark body > *:not(.wcags-widget) { filter: invert(1) hue-rotate(180deg); }
html.wcags-dark body { background: #fff; }
html.wcags-dark body > *:not(.wcags-widget) img, html.wcags-dark body > *:not(.wcags-widget) video, html.wcags-dark body > *:not(.wcags-widget) picture, html.wcags-dark body > *:not(.wcags-widget) iframe, html.wcags-dark body > *:not(.wcags-widget) [style*="background-image"] { filter: invert(1) hue-rotate(180deg); }
html.wcags-grayscale body > *:not(.wcags-widget) { filter: grayscale(1); }
html.wcags-lowsat body > *:not(.wcags-widget) { filter: saturate(.4); }
html.wcags-dark.wcags-grayscale body > *:not(.wcags-widget) { filter: invert(1) hue-rotate(180deg) grayscale(1); }
html.wcags-dark.wcags-lowsat body > *:not(.wcags-widget) { filter: invert(1) hue-rotate(180deg) saturate(.4); }

html.wcags-cursor, html.wcags-cursor body, html.wcags-cursor body * { cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'><path d='M4 2l14 12-6 1 4 7-3 1-4-7-5 5z' fill='%23000' stroke='%23fff' stroke-width='1.2'/></svg>") 4 2, auto !important; }
html.wcags-cursor body a, html.wcags-cursor body button, html.wcags-cursor body [role=button], html.wcags-cursor body label, html.wcags-cursor body select { cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'><path d='M9 2v9H7V6H5v9l4 6h7l3-6v-5h-2v3h-1V8h-2v5h-1V6h-2v7H11V2z' fill='%23000' stroke='%23fff' stroke-width='1'/></svg>") 12 2, pointer !important; }
html.wcags-focus body *:focus { outline: 4px solid #ff6a00 !important; outline-offset: 3px !important; box-shadow: 0 0 0 8px rgba(255,106,0,.35) !important; }
html.wcags-motion *, html.wcags-motion *::before, html.wcags-motion *::after { animation-play-state: paused !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
html.wcags-images body img:not(.wcags-widget img), html.wcags-images body picture, html.wcags-images body video, html.wcags-images body svg:not(.wcags-widget svg), html.wcags-images body [style*="background-image"] { visibility: hidden !important; background-image: none !important; }
html.wcags-targets body a, html.wcags-targets body button, html.wcags-targets body input[type=submit], html.wcags-targets body input[type=button], html.wcags-targets body [role=button], html.wcags-targets body input[type=checkbox], html.wcags-targets body input[type=radio] { min-height: 44px !important; min-width: 44px !important; padding: 8px 12px !important; box-sizing: border-box !important; }
html.wcags-targets body p a, html.wcags-targets body li a { min-height: 0 !important; min-width: 0 !important; padding: 4px 2px !important; display: inline-block; }
