/* Accessibility menu (panel) and its effects. State lives on html[data-uwa-*]. */

/* ---------- panel: a centred card ---------- */
.a11y-dlg { border: 0; padding: 0; margin: auto; width: min(42rem, calc(100% - 1.5rem)); max-height: min(88vh, 46rem); border-radius: 22px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
.a11y-dlg[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.a11y-dlg::backdrop { background: rgba(8, 18, 30, .45); }
.a11y__head { display: flex; align-items: center; gap: .7rem; padding: 1rem 1rem 1rem 1.3rem; background: var(--btn); color: #fff; border-radius: 22px 22px 0 0; }
.a11y__title { font-size: 1.15rem; color: #fff; margin: 0; flex: 1; min-width: 0; }
.a11y__kbd { font-size: .8rem; font-weight: 600; padding: .2rem .55rem; border-radius: 8px; background: rgba(255, 255, 255, .18); white-space: nowrap; }
.a11y__x { width: 2.6rem; height: 2.6rem; display: grid; place-items: center; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .16); color: #fff; flex: none; }
.a11y__x:hover { background: rgba(255, 255, 255, .28); }
.a11y__x svg, .a11y__ico svg, .a11y__reset svg { width: 1.4rem; height: 1.4rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.a11y__body { overflow-y: auto; min-height: 0; padding: 1rem; background: var(--tint-2); }
.a11y__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
@media (max-width: 560px) { .a11y__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.a11y__tile { display: grid; justify-items: center; align-content: start; gap: .35rem; min-height: 7.4rem; padding: .9rem .6rem .75rem; border: 2px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); text-align: center; font-size: .92rem; line-height: 1.25; min-width: 0; }
.a11y__tile:hover { border-color: var(--copper); }
.a11y__tile[aria-pressed="true"] { border-color: var(--btn); background: var(--tint); }
.a11y__ico { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 12px; background: var(--tint); color: var(--btn); }
.a11y__tile[aria-pressed="true"] .a11y__ico { background: var(--btn); color: #fff; }
.a11y__lbl { font-weight: 600; overflow-wrap: anywhere; }
.a11y__state { font-size: .8rem; color: var(--muted); }
.a11y__dots { display: flex; gap: .3rem; }
.a11y__dots i { width: .5rem; height: .5rem; border-radius: 50%; background: var(--line-2); }
.a11y__dots i.on { background: var(--btn); }
.a11y__foot { padding: .9rem 1rem 1rem; border-top: 1px solid var(--line); display: flex; justify-content: center; }
.a11y__reset { display: inline-flex; align-items: center; gap: .5rem; min-height: 2.8rem; padding: .55rem 1.2rem; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font-weight: 600; }
.a11y__reset:hover { border-color: var(--copper); color: var(--btn-hover); }
html.has-a11y { overflow: hidden; }
html:not(.js) .a11y-fab { display: none; }

/* ---------- text size ---------- */
html[data-uwa-text="1"] { font-size: 112.5%; }
html[data-uwa-text="2"] { font-size: 125%; }
html[data-uwa-text="3"] { font-size: 137.5%; }
html[data-uwa-text="4"] { font-size: 150%; }
html[data-uwa-text] .btn, html[data-uwa-text] .brand__name, html[data-uwa-text] .brand__role { white-space: normal; }
html[data-uwa-text] h1, html[data-uwa-text] h2, html[data-uwa-text] .card__title, html[data-uwa-text] .kicker > span { overflow-wrap: anywhere; }

/* ---------- spacing and line height ---------- */
html[data-uwa-spacing="1"] body *:not(svg):not(svg *) { letter-spacing: .06em !important; word-spacing: .12em !important; }
html[data-uwa-spacing="2"] body *:not(svg):not(svg *) { letter-spacing: .1em !important; word-spacing: .2em !important; }
html[data-uwa-spacing="3"] body *:not(svg):not(svg *) { letter-spacing: .16em !important; word-spacing: .3em !important; }
html[data-uwa-spacing] body :is(p, li, td, th, a, span, h1, h2, h3, summary, label) { overflow-wrap: anywhere; }
html[data-uwa-lh="1"] body :is(p, li, dd, dt, td, th, blockquote, figcaption, summary, label, .lead, .card__text, .facts__txt, .kv__v) { line-height: 1.95 !important; }
html[data-uwa-lh="2"] body :is(p, li, dd, dt, td, th, blockquote, figcaption, summary, label, .lead, .card__text, .facts__txt, .kv__v) { line-height: 2.25 !important; }
html[data-uwa-lh="3"] body :is(p, li, dd, dt, td, th, blockquote, figcaption, summary, label, .lead, .card__text, .facts__txt, .kv__v) { line-height: 2.55 !important; }

/* ---------- links ---------- */
html[data-uwa-links] a:not(.btn):not(.cicon):not(.icon-btn):not(.biz__tile):not(.card):not(.brand):not(.skip):not(.vcard__play) { text-decoration: underline !important; text-decoration-thickness: 2px !important; background-color: #fff2a8 !important; color: #1b1b1b !important; }
html[data-uwa-links] :is(.btn, .cicon, .icon-btn, .biz__tile, a.card) { outline: 3px solid #e0b100 !important; outline-offset: 2px; }

/* ---------- hide images (alt text shown instead) ---------- */
html[data-uwa-hideimg] img, html[data-uwa-hideimg] .art, html[data-uwa-hideimg] iframe { visibility: hidden !important; }
html[data-uwa-hideimg] [data-uwa-alt] { position: relative; }
html[data-uwa-hideimg] [data-uwa-alt]::after { content: attr(data-uwa-alt); position: absolute; inset: 0; display: grid; place-items: center; padding: .8rem; text-align: center; font-size: .92rem; color: var(--ink); background: var(--tint-2); border: 1px dashed var(--line-2); border-radius: inherit; }
html[data-uwa-hideimg] :is(.vcard__media, .fvid__thumb) { background: var(--tint-2) !important; }

/* ---------- fonts ---------- */
html[data-uwa-font="1"] body, html[data-uwa-font="1"] body *:not(svg):not(svg *) { font-family: Verdana, Tahoma, "Segoe UI", Arial, sans-serif !important; }
html[data-uwa-font="2"] body, html[data-uwa-font="2"] body *:not(svg):not(svg *) { font-family: "Comic Sans MS", "Comic Neue", "Chalkboard SE", Verdana, sans-serif !important; letter-spacing: .02em; }

/* ---------- cursor, reading guide, reading mask ---------- */
html[data-uwa-cursor="1"], html[data-uwa-cursor="1"] * { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'%3E%3Cpath d='M6 3l28 14-12 3.5-5.5 13z' fill='%23111' stroke='%23fff' stroke-width='2.6' stroke-linejoin='round'/%3E%3C/svg%3E") 6 3, auto !important; }
.uwa-guide { position: fixed; left: 0; right: 0; top: -40px; height: 14px; z-index: 2147483000; pointer-events: none; background: rgba(17, 17, 17, .78); border-block: 3px solid #ffd400; }
.uwa-mask { position: fixed; left: 0; right: 0; z-index: 2147483000; pointer-events: none; background: rgba(6, 14, 24, .62); }
.uwa-mask--top { top: 0; height: 0; }
.uwa-mask--bot { top: 100%; bottom: 0; }

/* ---------- text alignment ---------- */
html[data-uwa-align="left"] main :is(p, li, h1, h2, h3, td, th, figcaption, blockquote, summary) { text-align: left !important; }
html[data-uwa-align="right"] main :is(p, li, h1, h2, h3, td, th, figcaption, blockquote, summary) { text-align: right !important; }
html[data-uwa-align="center"] main :is(p, li, h1, h2, h3, td, th, figcaption, blockquote, summary) { text-align: center !important; }
html[data-uwa-align="justify"] main :is(p, li, td, figcaption, blockquote) { text-align: justify !important; }

/* ---------- saturation and invert (filters live on html, so fixed elements keep their place) ---------- */
html[data-uwa-sat="low"] { filter: saturate(.45); }
html[data-uwa-sat="high"] { filter: saturate(1.8); }
html[data-uwa-sat="gray"] { filter: grayscale(1); }
html[data-uwa-contrast="invert"] { filter: invert(1) hue-rotate(180deg); }
html[data-uwa-contrast="invert"][data-uwa-sat="low"] { filter: invert(1) hue-rotate(180deg) saturate(.45); }
html[data-uwa-contrast="invert"][data-uwa-sat="high"] { filter: invert(1) hue-rotate(180deg) saturate(1.8); }
html[data-uwa-contrast="invert"][data-uwa-sat="gray"] { filter: invert(1) hue-rotate(180deg) grayscale(1); }
html[data-uwa-contrast="invert"] :is(img, iframe, .a11y-fab) { filter: invert(1) hue-rotate(180deg); }

/* ---------- dark contrast ---------- */
html[data-uwa-contrast="dark"] { color-scheme: dark; background: #000 !important; }
html[data-uwa-contrast="dark"] body { background: #000 !important; }
html[data-uwa-contrast="dark"] body *:not(svg):not(svg *):not(img):not(iframe) { background-color: transparent !important; background-image: none !important; color: #fff !important; border-color: rgba(255, 255, 255, .5) !important; box-shadow: none !important; text-shadow: none !important; }
html[data-uwa-contrast="dark"] .site-header::before { background: #000 !important; border-color: rgba(255, 255, 255, .5) !important; -webkit-backdrop-filter: none; backdrop-filter: none; }
html[data-uwa-contrast="dark"] :is(.nav__panel-in, .drawer, .dlg, .toast, .a11y-dlg, .a11y__body, .cta-slot .cta) { background-color: #000 !important; }
html[data-uwa-contrast="dark"] body :is(a, a *):not(svg):not(svg *):not(img):not(iframe):not(video) { color: #ffe866 !important; }
html[data-uwa-contrast="dark"] :is(.btn, .cicon, .icon-btn, .biz__tile, .a11y-fab, .a11y__tile, .a11y__reset, .a11y__x) { background-color: #000 !important; color: #ffe866 !important; border: 2px solid #ffe866 !important; }
html[data-uwa-contrast="dark"] :is(.btn, .cicon, .icon-btn, .biz__tile) * { color: #ffe866 !important; }
html[data-uwa-contrast="dark"] .a11y__tile[aria-pressed="true"] { outline: 3px solid #fff !important; }
html[data-uwa-contrast="dark"] .a11y__dots i.on { background: #ffe866 !important; }
html[data-uwa-contrast="dark"] .sresults mark { background: #ffe866 !important; color: #000 !important; }
html[data-uwa-contrast="dark"] .crumbs li + li::before { color: #fff !important; }
html[data-uwa-contrast="dark"] .art * { stroke: #fff !important; }
html[data-uwa-contrast="dark"] .art :is(.a-soft, .a-globe, .a-cloud, .a-fill-hl) { fill: transparent !important; }
html[data-uwa-contrast="dark"] .art :is(.a-dot, .a-dot-v) { fill: #ffe866 !important; stroke: none !important; }

/* ---------- light contrast ---------- */
html[data-uwa-contrast="light"], html[data-uwa-contrast="light"] body { background: #fff !important; }
html[data-uwa-contrast="light"] body *:not(svg):not(svg *):not(img):not(iframe) { background-color: transparent !important; background-image: none !important; color: #000 !important; border-color: #000 !important; box-shadow: none !important; text-shadow: none !important; }
html[data-uwa-contrast="light"] .site-header::before { background: #fff !important; border-color: #000 !important; -webkit-backdrop-filter: none; backdrop-filter: none; }
html[data-uwa-contrast="light"] :is(.nav__panel-in, .drawer, .dlg, .toast, .a11y-dlg, .a11y__body, .cta-slot .cta) { background-color: #fff !important; }
html[data-uwa-contrast="light"] body :is(a, a *):not(svg):not(svg *):not(img):not(iframe):not(video) { color: #0000c8 !important; }
html[data-uwa-contrast="light"] :is(.btn, .cicon, .icon-btn, .biz__tile, .a11y-fab, .a11y__tile, .a11y__reset, .a11y__x) { background-color: #fff !important; color: #000 !important; border: 2px solid #000 !important; }
html[data-uwa-contrast="light"] :is(.btn, .cicon, .icon-btn, .biz__tile) * { color: #000 !important; }
html[data-uwa-contrast="light"] .a11y__tile[aria-pressed="true"] { outline: 3px solid #0000c8 !important; }
html[data-uwa-contrast="light"] .a11y__dots i.on { background: #000 !important; }
html[data-uwa-contrast="light"] .art * { stroke: #000 !important; }
html[data-uwa-contrast="light"] .art :is(.a-soft, .a-globe, .a-cloud, .a-fill-hl) { fill: transparent !important; }
html[data-uwa-contrast="light"] .art :is(.a-dot, .a-dot-v) { fill: #000 !important; stroke: none !important; }

/* logo on dark grounds */
html:is([data-uwa-contrast="dark"], [data-uwa-contrast="invert"]) .brand__mark { display: none; }
html:is([data-uwa-contrast="dark"], [data-uwa-contrast="invert"]) .brand__mark--light { display: block; }

/* ---------- paused animations ---------- */
html.a11y-pause::view-transition-group(*), html.a11y-pause::view-transition-old(*), html.a11y-pause::view-transition-new(*) { animation: none !important; }
