/* Shared accessibility toolbar (Design Baseline v1). Pairs with a11y-toolbar.js.
   Themable per site: --a11y-bg --a11y-ink --a11y-ink-2 --a11y-accent --a11y-on-accent --a11y-rule --a11y-focus --a11y-fab-bottom.
   Defaults fall back to the baseline slots (--surface --ink --ink-2 --brand --rule). Fill or border, never both (BASELINE #13). */

/* ---- preferences (the toolbar only flips these attributes) ---- */
html[data-a11y-text="1"] { font-size: 112.5%; }
html[data-a11y-text="2"] { font-size: 125%; }
html[data-a11y-text="3"] { font-size: 137.5%; }
/* px-based sites: zoom the page body instead, so fixed-px type also grows and layouts reflow */
html[data-a11y-scale-zoom][data-a11y-text] { font-size: 100%; }
html[data-a11y-scale-zoom][data-a11y-text="1"] body { zoom: 1.125; }
html[data-a11y-scale-zoom][data-a11y-text="2"] body { zoom: 1.25; }
html[data-a11y-scale-zoom][data-a11y-text="3"] body { zoom: 1.375; }

html[data-a11y-contrast] {
  --ink-2: var(--ink); --on-dark-2: var(--on-dark);
  --rule: color-mix(in srgb, var(--ink, #111) 55%, transparent);
  --rule-dark: color-mix(in srgb, var(--on-dark, #fff) 60%, transparent);
}
html[data-a11y-underline] a { text-decoration: underline !important; text-decoration-thickness: max(1px, .08em) !important; text-underline-offset: .2em !important; }
html[data-a11y-font] body, html[data-a11y-font] body *:not(svg):not(svg *) { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, Helvetica, sans-serif !important; letter-spacing: normal !important; font-style: normal; }
html[data-a11y-cursor], html[data-a11y-cursor] * { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 24 24'%3E%3Cpath d='M4 2l16 9-7 2-3 7z' fill='%23111' stroke='white' stroke-width='1.6'/%3E%3C/svg%3E") 6 3, auto !important; }
html[data-a11y-cursor] a, html[data-a11y-cursor] button, html[data-a11y-cursor] [role=button], html[data-a11y-cursor] label { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 24 24'%3E%3Cpath d='M4 2l16 9-7 2-3 7z' fill='%230B57D0' stroke='white' stroke-width='1.6'/%3E%3C/svg%3E") 6 3, pointer !important; }
html[data-a11y-motion] { scroll-behavior: auto !important; }
html[data-a11y-motion] *, html[data-a11y-motion] *::before, html[data-a11y-motion] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }

/* ---- skip link + main target (ACCESSIBILITY-STANDARD §4) ---- */
.skip-link { position: absolute; left: 8px; top: -80px; z-index: 1000; padding: 12px 18px; border-radius: 10px; background: var(--a11y-accent, var(--brand, #0D2230)); color: var(--a11y-on-accent, #fff); font-weight: 600; text-decoration: underline; }
.skip-link:focus { top: 8px; outline: 3px solid var(--a11y-focus, #0B57D0); outline-offset: 2px; }
main[tabindex="-1"]:focus { outline: none; }

/* ---- footer trigger (default: inline, covers nothing) ---- */
.a11y-tb-slot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin: 20px 0 0; }
.a11y-tb-trigger { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 12px; border-radius: 999px; border: 1px solid currentColor; background: transparent; color: inherit; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.a11y-tb-trigger svg, .a11y-tb-fab svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.a11y-tb-slot a { color: inherit; text-decoration: underline; text-underline-offset: .2em; font-size: 15px; min-height: 24px; display: inline-flex; align-items: center; }
.a11y-tb-trigger:focus-visible, .a11y-tb-slot a:focus-visible { outline: 3px solid var(--a11y-focus, currentColor); outline-offset: 3px; }

/* ---- optional floating trigger (data-mode="floating"): lower-left, hides while the footer is on screen ---- */
.a11y-tb-fab { position: fixed; left: 16px; bottom: var(--a11y-fab-bottom, 16px); z-index: 60; width: 44px; height: 44px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--a11y-accent, var(--brand, #0D2230)); color: var(--a11y-on-accent, #fff); cursor: pointer; }
.a11y-tb-fab[hidden] { display: none; }
.a11y-tb-fab:focus-visible { outline: 3px solid var(--a11y-focus, var(--a11y-accent, #0B57D0)); outline-offset: 3px; }
.a11y-tb-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- the dialog ---- */
.a11y-tb { box-sizing: border-box; width: min(440px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: auto; margin: auto; padding: 24px; border: 0; border-radius: 16px;
  background: var(--a11y-bg, var(--surface, #fff)); color: var(--a11y-ink, var(--ink, #161616)); font-family: inherit; font-size: 16px; line-height: 1.45; box-shadow: 0 24px 60px rgba(0,0,0,.28); }
.a11y-tb *, .a11y-tb *::before, .a11y-tb *::after { box-sizing: border-box; }
.a11y-tb::backdrop { background: rgba(0,0,0,.45); }
.a11y-tb-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.a11y-tb h2 { margin: 0; font-size: 22px; line-height: 1.2; font-weight: 700; color: inherit; letter-spacing: 0; text-transform: none; }
.a11y-tb-close { min-height: 44px; min-width: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid currentColor; background: transparent; color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.a11y-tb-note { margin: 6px 0 16px; font-size: 14px; color: var(--a11y-ink-2, var(--ink-2, #4a4a4a)); }
.a11y-tb-size { margin: 0 0 8px; padding: 0; border: 0; }
.a11y-tb-size legend { padding: 0; margin-bottom: 8px; font-weight: 600; }
.a11y-tb-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.a11y-tb-steps label { position: relative; cursor: pointer; }
.a11y-tb-steps input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.a11y-tb-steps span { display: grid; place-items: center; min-height: 44px; border-radius: 10px; background: var(--a11y-chip, color-mix(in srgb, var(--a11y-ink, var(--ink, #161616)) 8%, transparent)); font-weight: 600; font-size: 15px; }
.a11y-tb-steps input:checked + span { background: var(--a11y-accent, var(--brand, #0D2230)); color: var(--a11y-on-accent, #fff); }
.a11y-tb-steps input:focus-visible + span { outline: 3px solid var(--a11y-focus, var(--a11y-ink, #161616)); outline-offset: 2px; }
.a11y-tb-list { list-style: none; margin: 8px 0 16px; padding: 0; }
.a11y-tb-list li + li { border-top: 1px solid var(--a11y-rule, var(--rule, rgba(0,0,0,.14))); }
.a11y-tb-list [role=switch] { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; min-height: 56px; padding: 10px 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.a11y-tb-txt { display: flex; flex-direction: column; }
.a11y-tb-lbl { font-weight: 600; }
.a11y-tb-desc { font-size: 14px; color: var(--a11y-ink-2, var(--ink-2, #4a4a4a)); }
.a11y-tb-track { position: relative; flex: none; width: 44px; height: 26px; border-radius: 999px; background: #6B6B6B; transition: background .15s; }
.a11y-tb-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; }
.a11y-tb [aria-checked=true] .a11y-tb-track { background: var(--a11y-accent, var(--brand, #0D2230)); }
.a11y-tb [aria-checked=true] .a11y-tb-track::after { transform: translateX(18px); }
.a11y-tb [role=switch]:focus-visible { outline: 3px solid var(--a11y-focus, currentColor); outline-offset: 2px; border-radius: 8px; }
.a11y-tb-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.a11y-tb-reset { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 0; background: var(--a11y-accent, var(--brand, #0D2230)); color: var(--a11y-on-accent, #fff); font: inherit; font-weight: 600; cursor: pointer; }
.a11y-tb-foot a { color: inherit; text-decoration: underline; text-underline-offset: .2em; }
.a11y-tb-reset:focus-visible, .a11y-tb-close:focus-visible, .a11y-tb-foot a:focus-visible { outline: 3px solid var(--a11y-focus, currentColor); outline-offset: 3px; }
.a11y-tb-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }
@media (prefers-reduced-motion: reduce) { .a11y-tb-track, .a11y-tb-track::after { transition: none; } }
