/* Accessibility menu (a11y.js) and the page-wide settings it toggles. Colours follow the site tokens. */
:root { --a11y-font-scale: 1; }
html { font-size: calc(100% * var(--a11y-font-scale)); }

.a11y-btn { position: fixed; right: 0; top: 66%; z-index: 90; display: grid; place-items: center;
  inline-size: 3rem; block-size: 3.25rem; padding: 0 0 0 .15rem; border: 1.5px solid rgba(255, 255, 255, .7); border-right: 0; border-radius: 16px 0 0 16px; background: var(--navy, #041238); color: var(--white, #fff);
  cursor: pointer; box-shadow: -4px 6px 16px rgba(4, 18, 56, .22); transition: background-color 180ms ease; }
.a11y-btn svg { inline-size: 1.6rem; block-size: 1.6rem; }
.a11y-btn:focus-visible { outline: 3px solid var(--amber, #1B5CF0); outline-offset: 2px; }
.a11y-btn[aria-expanded="true"] { background: var(--amber, #1B5CF0); }

.a11y-panel { position: fixed; right: .75rem; bottom: calc(.75rem + env(safe-area-inset-bottom)); z-index: 95; inline-size: min(100vw - 2rem, 21rem); max-block-size: min(80vh, 36rem); overflow-y: auto;
  padding: 1rem; border: 1px solid var(--line, #D9DCE4); border-radius: 18px; background: var(--white, #fff); color: var(--ink, #0B1226);
  font: 400 .9375rem/1.5 var(--font, "Rubik", Arial, sans-serif); text-align: right; box-shadow: 0 18px 44px rgba(4, 18, 56, .22); }
.a11y-panel[hidden] { display: none; }
.a11y-panel svg { inline-size: 1.1rem; block-size: 1.1rem; flex: none; }
.a11y-top { display: flex; align-items: center; justify-content: space-between; margin-block-end: .75rem; }
.a11y-top h2 { margin: 0; font-size: 1.0625rem; font-weight: 700; color: var(--navy, #041238); }
.a11y-x { display: grid; place-items: center; inline-size: 2.5rem; block-size: 2.5rem; border: 0; border-radius: 10px; background: transparent; color: var(--muted, #4A5368); cursor: pointer; }
.a11y-size { margin-block-end: .6rem; padding: .7rem; border: 1px solid var(--line, #D9DCE4); border-radius: 12px; }
.a11y-size-row { display: flex; align-items: center; justify-content: space-between; margin-block-end: .5rem; }
.a11y-size-row span { display: flex; align-items: center; gap: .35rem; }
.a11y-size-row output { font-weight: 700; color: var(--amber, #1B5CF0); font-variant-numeric: tabular-nums; }
.a11y-steps { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: .5rem; }
.a11y-steps button, .a11y-grid button { display: flex; align-items: center; justify-content: center; min-block-size: 2.75rem; border: 1.5px solid var(--line, #D9DCE4); border-radius: 10px;
  background: var(--white, #fff); color: var(--ink, #0B1226); font: inherit; font-size: .8125rem; cursor: pointer; transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease; }
.a11y-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.a11y-grid button { flex-direction: column; gap: .3rem; padding: .55rem .35rem; line-height: 1.25; text-align: center; color: var(--muted, #4A5368); }
.a11y-grid button[aria-pressed="true"] { border-color: var(--amber, #1B5CF0); background: var(--tint, #E4E9F5); color: var(--navy, #041238); font-weight: 500; }
.a11y-reset { display: flex; align-items: center; justify-content: center; gap: .4rem; inline-size: 100%; min-block-size: 2.75rem; margin-block-start: .75rem; border: 0; border-radius: 999px;
  background: var(--navy, #041238); color: var(--white, #fff); font: 700 .9375rem var(--font, "Rubik", Arial, sans-serif); cursor: pointer; }
.a11y-links { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin-block-start: .6rem; font-size: .8125rem; }
.a11y-links a { display: inline-block; padding-block: .35rem; color: var(--navy, #041238); font-weight: 500; text-decoration: underline; text-decoration-color: var(--amber, #1B5CF0); text-underline-offset: 3px; }
.a11y-panel p { margin: .35rem 0 0; font-size: .75rem; color: var(--muted, #4A5368); }

@media (hover: hover) and (pointer: fine) {
  .a11y-btn:hover { background: var(--amber, #1B5CF0); }
  .a11y-x:hover { color: var(--navy, #041238); background: var(--tint, #E4E9F5); }
  .a11y-steps button:hover, .a11y-grid button:hover { border-color: var(--amber, #1B5CF0); }
  .a11y-reset:hover { background: var(--amber, #1B5CF0); }
}
@media (min-width: 48rem) {
  .a11y-btn { inline-size: 3.25rem; block-size: 3.5rem; }
  .a11y-btn svg { inline-size: 1.8rem; block-size: 1.8rem; }
  .a11y-panel { right: 4rem; bottom: 1.5rem; }
}

/* Settings applied to the whole page */
html.a11y-contrast-high { --bg: #FFFFFF; --ink: #000000; --muted: #1A1A1A; --line: #000000; --tint: #FFFFFF; }
html.a11y-contrast-high body { background: #FFFFFF !important; color: #000000 !important; }
html.a11y-contrast-inverted { filter: invert(1) hue-rotate(180deg); }
html.a11y-contrast-inverted img, html.a11y-contrast-inverted video, html.a11y-contrast-inverted picture { filter: invert(1) hue-rotate(180deg); }
html.a11y-grayscale { filter: grayscale(1); }
html.a11y-highlight-links a { background: #FFF2A8 !important; color: #000000 !important; outline: 2px solid #D4A200; }
html.a11y-underline-links a { text-decoration: underline !important; }
html.a11y-readable-font, html.a11y-readable-font body, html.a11y-readable-font * { font-family: Arial, "Helvetica Neue", Helvetica, sans-serif !important; }
html.a11y-big-cursor, html.a11y-big-cursor * {
  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='M3 2l7 18 2.5-7L20 10.5z' fill='black' stroke='white' stroke-width='1.5'/></svg>") 0 0, auto !important;
}
html.a11y-stop-animations *, html.a11y-stop-animations *::before, html.a11y-stop-animations *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
