/* GNSH V46 — WCAG-oriented accessibility controls and restrained motion */
:root {
    --gh46-a11y-blue: #0b4f9c;
    --gh46-a11y-blue-dark: #07356c;
    --gh46-a11y-red: #c93131;
    --gh46-a11y-green: #0b766f;
    --gh46-a11y-ink: #17365f;
    --gh46-a11y-muted: #61738e;
    --gh46-a11y-line: #d8e3f0;
    --gh46-a11y-bg: #f6f9fd;
    --gh46-font-percent: 100%;
}

html {
    scroll-behavior: smooth;
    font-size: var(--gh46-font-percent, 100%);
}

/* --------------------------------------------------------------------------
   Floating accessibility control
   -------------------------------------------------------------------------- */
.gh46-accessibility {
    position: fixed;
    z-index: 2147481000;
    right: max(14px, env(safe-area-inset-right));
    bottom: max(18px, env(safe-area-inset-bottom));
    font-family: inherit;
    color: var(--gh46-a11y-ink);
}

.gh46-accessibility__launchers {
    display: grid;
    justify-items: end;
    gap: 8px;
}

.gh46-accessibility__launcher,
.gh46-accessibility__top {
    display: inline-grid;
    place-items: center;
    width: 52px;
    height: 52px;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, .95);
    border-radius: 14px;
    color: #fff;
    box-shadow: 0 12px 28px rgba(9, 48, 98, .24);
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.gh46-accessibility__launcher {
    background: linear-gradient(145deg, var(--gh46-a11y-green), #075b56);
}

.gh46-accessibility__top {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--gh46-a11y-blue);
    font-size: 1.25rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
}

.gh46-accessibility__top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.gh46-accessibility__launcher svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.gh46-accessibility__launcher:hover,
.gh46-accessibility__launcher:focus-visible,
.gh46-accessibility__top:hover,
.gh46-accessibility__top:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(9, 48, 98, .3);
}

.gh46-accessibility__panel {
    position: absolute;
    right: 0;
    bottom: 66px;
    width: min(410px, calc(100vw - 28px));
    max-height: min(82vh, 760px);
    overflow: hidden;
    border: 1px solid #cddbea;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 22px 60px rgba(5, 36, 79, .3);
}

.gh46-accessibility__panel[hidden] {
    display: none !important;
}

.gh46-accessibility__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 18px 18px 16px;
    color: #fff;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, .08) 0 2px, transparent 2px 100%),
        linear-gradient(135deg, #073b7b, #0b5a9d 58%, #08756d);
    border-bottom: 3px solid var(--gh46-a11y-red);
}

.gh46-accessibility__kicker {
    display: block;
    margin-bottom: 4px;
    color: #d8eaff;
    font-size: .73rem;
    font-weight: 800;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.gh46-accessibility__header h2 {
    margin: 0;
    color: #fff;
    font-size: 1.35rem;
    line-height: 1.25;
}

.gh46-accessibility__header p {
    margin: 5px 0 0;
    color: #e8f2ff;
    font-size: .86rem;
    line-height: 1.5;
}

.gh46-accessibility__close {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .52);
    border-radius: 10px;
    background: rgba(0, 0, 0, .16);
    color: #fff;
    font-size: 1.55rem;
    line-height: 1;
    cursor: pointer;
}

.gh46-accessibility__body {
    max-height: calc(min(82vh, 760px) - 142px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 14px;
    background: var(--gh46-a11y-bg);
    scrollbar-width: thin;
    scrollbar-color: #9eb4d0 transparent;
}

.gh46-accessibility__group {
    padding: 14px;
    border: 1px solid var(--gh46-a11y-line);
    border-radius: 14px;
    background: #fff;
}

.gh46-accessibility__group + .gh46-accessibility__group {
    margin-top: 10px;
}

.gh46-accessibility__group-title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 11px;
}

.gh46-accessibility__group-title > span {
    display: inline-grid;
    place-items: center;
    min-width: 30px;
    height: 30px;
    padding: 0 6px;
    border-radius: 8px;
    background: #eaf2fc;
    color: var(--gh46-a11y-blue);
    font-size: .82rem;
    font-weight: 900;
}

.gh46-accessibility__group-title h3 {
    margin: 0;
    color: var(--gh46-a11y-ink);
    font-size: 1rem;
    line-height: 1.3;
}

.gh46-accessibility__font-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(58px, 1fr)) auto;
    gap: 8px;
    align-items: center;
}

.gh46-accessibility__font-row button,
.gh46-accessibility__option-grid button,
.gh46-accessibility__visual-grid button,
.gh46-accessibility__speech-controls button,
.gh46-accessibility__help-row button,
.gh46-accessibility__wide-toggle {
    min-height: 44px;
    border: 1px solid #cddbea;
    border-radius: 10px;
    background: #fff;
    color: #17365f;
    font: inherit;
    font-size: .88rem;
    font-weight: 750;
    line-height: 1.3;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease, color .15s ease, transform .15s ease;
}

.gh46-accessibility__font-row button:hover,
.gh46-accessibility__option-grid button:hover,
.gh46-accessibility__visual-grid button:hover,
.gh46-accessibility__speech-controls button:hover,
.gh46-accessibility__help-row button:hover,
.gh46-accessibility__wide-toggle:hover {
    border-color: #8cacd2;
    background: #f3f8fe;
}

.gh46-accessibility__font-row button:focus-visible,
.gh46-accessibility__option-grid button:focus-visible,
.gh46-accessibility__visual-grid button:focus-visible,
.gh46-accessibility__speech-controls button:focus-visible,
.gh46-accessibility__help-row button:focus-visible,
.gh46-accessibility__wide-toggle:focus-visible,
.gh46-accessibility__close:focus-visible,
.gh46-accessibility__launcher:focus-visible,
.gh46-accessibility__top:focus-visible,
.gh46-keyboard-help button:focus-visible {
    outline: 3px solid #ffbf47 !important;
    outline-offset: 2px !important;
}

.gh46-accessibility__font-row output {
    min-width: 54px;
    text-align: center;
    color: var(--gh46-a11y-blue);
    font-size: .83rem;
    font-weight: 850;
}

.gh46-accessibility__option-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 10px;
}

.gh46-accessibility__option-grid button,
.gh46-accessibility__help-row button {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 11px;
    text-align: left;
}

.gh46-accessibility__option-grid button > span,
.gh46-accessibility__help-row button > span {
    flex: 0 0 auto;
    display: inline-grid;
    place-items: center;
    width: 27px;
    height: 27px;
    border-radius: 7px;
    background: #edf4fc;
    color: var(--gh46-a11y-blue);
    font-size: .78rem;
    font-weight: 900;
}

.gh46-accessibility__option-grid button[aria-pressed="true"],
.gh46-accessibility__wide-toggle[aria-pressed="true"],
.gh46-accessibility__visual-grid button[aria-pressed="true"] {
    border-color: #1d66b5;
    background: #e7f1fd;
    color: #063c7a;
    box-shadow: inset 3px 0 0 #1d66b5;
}

.gh46-accessibility__visual-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.gh46-accessibility__visual-grid button {
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 6px;
    padding: 8px 5px;
    min-height: 68px;
    text-align: center;
    font-size: .78rem;
}

.gh46-accessibility__swatch {
    display: block;
    width: 28px;
    height: 18px;
    border: 1px solid #8195ad;
    border-radius: 4px;
}

.gh46-accessibility__swatch.is-high {
    background: linear-gradient(90deg, #fff 50%, #000 50%);
}

.gh46-accessibility__swatch.is-dark {
    background: linear-gradient(90deg, #000 72%, #ffe500 72%);
}

.gh46-accessibility__swatch.is-gray {
    background: linear-gradient(90deg, #eee, #777, #111);
}

.gh46-accessibility__wide-toggle {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 10px;
    padding: 10px 11px;
    text-align: left;
}

.gh46-accessibility__wide-toggle > span:first-child {
    display: grid;
    place-items: center;
    width: 31px;
    height: 31px;
    border-radius: 8px;
    background: #fdeaea;
    color: #b92525;
}

.gh46-accessibility__wide-toggle strong,
.gh46-accessibility__wide-toggle small {
    display: block;
}

.gh46-accessibility__wide-toggle small {
    margin-top: 2px;
    color: var(--gh46-a11y-muted);
    font-size: .75rem;
    font-weight: 500;
}

.gh46-accessibility__speech-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.gh46-accessibility__speech-controls button {
    padding: 8px 6px;
}

.gh46-accessibility__speech-controls button:disabled {
    cursor: not-allowed;
    opacity: .48;
    background: #f2f4f7;
}

.gh46-accessibility__speed {
    display: grid;
    grid-template-columns: auto minmax(100px, 1fr) 44px;
    gap: 9px;
    align-items: center;
    margin-top: 11px;
    color: var(--gh46-a11y-ink);
    font-size: .82rem;
    font-weight: 750;
}

.gh46-accessibility__speed input {
    min-height: 28px;
    accent-color: var(--gh46-a11y-blue);
}

.gh46-accessibility__speed output {
    text-align: right;
    color: var(--gh46-a11y-blue);
    font-weight: 850;
}

.gh46-accessibility__speech-status {
    min-height: 1.4em;
    margin: 9px 0 0;
    color: var(--gh46-a11y-muted);
    font-size: .78rem;
    line-height: 1.45;
}

.gh46-accessibility__help-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.gh46-accessibility__help-row button {
    margin: 0;
}

.gh46-accessibility__help-row button.is-reset {
    color: #a52727;
}

.gh46-accessibility__help-row button.is-reset > span {
    background: #fdecec;
    color: #a52727;
}

.gh46-accessibility__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 14px;
    border-top: 1px solid var(--gh46-a11y-line);
    background: #fff;
    color: #6b7d95;
    font-size: .72rem;
}

.gh46-accessibility kbd,
.gh46-keyboard-help kbd {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 25px;
    min-height: 24px;
    padding: 2px 6px;
    border: 1px solid #aebed1;
    border-bottom-width: 2px;
    border-radius: 5px;
    background: #fff;
    color: #233f64;
    font-family: inherit;
    font-size: .72rem;
    font-weight: 800;
    box-shadow: none;
}

/* Keyboard help dialog */
.gh46-keyboard-help {
    width: min(620px, calc(100vw - 28px));
    max-height: min(82vh, 720px);
    padding: 0;
    overflow: hidden;
    border: 1px solid #c7d6e8;
    border-radius: 16px;
    color: var(--gh46-a11y-ink);
    background: #fff;
    box-shadow: 0 24px 70px rgba(2, 28, 66, .36);
}

.gh46-keyboard-help::backdrop {
    background: rgba(5, 24, 49, .62);
    backdrop-filter: blur(2px);
}

.gh46-keyboard-help__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 18px;
    border-bottom: 3px solid var(--gh46-a11y-red);
    background: #0b4f91;
    color: #fff;
}

.gh46-keyboard-help__header span {
    display: block;
    margin-bottom: 4px;
    color: #d8eaff;
    font-size: .73rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.gh46-keyboard-help__header h2 {
    margin: 0;
    color: #fff;
    font-size: 1.4rem;
}

.gh46-keyboard-help__header button {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 9px;
    background: rgba(0, 0, 0, .16);
    color: #fff;
    font-size: 1.45rem;
    cursor: pointer;
}

.gh46-keyboard-help__body {
    max-height: 55vh;
    overflow: auto;
    padding: 12px 18px 18px;
}

.gh46-keyboard-help__body dl {
    margin: 0;
}

.gh46-keyboard-help__body dl > div {
    display: grid;
    grid-template-columns: minmax(110px, 150px) 1fr;
    gap: 15px;
    padding: 13px 0;
    border-bottom: 1px solid #e1e9f3;
}

.gh46-keyboard-help__body dt,
.gh46-keyboard-help__body dd {
    margin: 0;
}

.gh46-keyboard-help__body dd {
    color: #536b89;
    line-height: 1.55;
}

.gh46-keyboard-help__footer {
    display: flex;
    justify-content: flex-end;
    padding: 12px 18px;
    border-top: 1px solid #dce6f1;
    background: #f7fafd;
}

.gh46-keyboard-help__footer button {
    min-height: 44px;
    padding: 8px 18px;
    border: 0;
    border-radius: 9px;
    background: var(--gh46-a11y-blue);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

/* --------------------------------------------------------------------------
   User preference modes
   -------------------------------------------------------------------------- */
html.gh46-line-spacing body :where(p, li, dd, dt, blockquote, td, th, label, input, textarea, select) {
    line-height: 1.9 !important;
}

html.gh46-letter-spacing body :where(p, li, dd, dt, blockquote, td, th, label, input, textarea, select, button, a) {
    letter-spacing: .075em !important;
    word-spacing: .12em !important;
}

html.gh46-dyslexia body,
html.gh46-dyslexia body :where(input, button, select, textarea) {
    font-family: OpenDyslexic, "Atkinson Hyperlegible", Verdana, Tahoma, Arial, sans-serif !important;
}

html.gh46-highlight-links body a:not(.gh46-accessibility__launcher):not(.gh46-accessibility__top) {
    text-decoration: underline !important;
    text-decoration-thickness: .14em !important;
    text-underline-offset: .18em !important;
    outline: 2px solid #ffbf00 !important;
    outline-offset: 2px !important;
    background-color: #fff3a6 !important;
    color: #001b5a !important;
}

html.gh46-large-cursor,
html.gh46-large-cursor body,
html.gh46-large-cursor body * {
    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='M5 3v29l8-8 5 12 6-3-5-11h12z' fill='%23fff' stroke='%23000' stroke-width='2.5' stroke-linejoin='round'/%3E%3C/svg%3E") 5 3, auto !important;
}

html.gh46-hide-decorative body img[alt=""],
html.gh46-hide-decorative body img[role="presentation"],
html.gh46-hide-decorative body img[aria-hidden="true"],
html.gh46-hide-decorative body [data-decorative-image],
html.gh46-hide-decorative body .decorative-image,
html.gh46-hide-decorative body .professional-slide__shade,
html.gh46-hide-decorative body .gh-decoration,
html.gh46-hide-decorative body [aria-hidden="true"] > img {
    display: none !important;
}

html.gh46-grayscale body {
    filter: grayscale(1) !important;
}

html.gh46-high-contrast body {
    background: #fff !important;
    color: #000 !important;
}

html.gh46-high-contrast body :where(main, section, article, aside, nav, header, footer, table, form, div:not(.gh46-accessibility__swatch)) {
    background-color: #fff !important;
    background-image: none !important;
    color: #000 !important;
    border-color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

html.gh46-high-contrast body :where(h1, h2, h3, h4, h5, h6, p, li, dt, dd, span, small, strong, label, th, td) {
    color: #000 !important;
    text-shadow: none !important;
}

html.gh46-high-contrast body :where(a, button) {
    color: #0000c8 !important;
    text-decoration: underline !important;
}

html.gh46-high-contrast body :where(button, input, select, textarea) {
    border: 2px solid #000 !important;
    background: #fff !important;
    color: #000 !important;
}

html.gh46-high-contrast body :focus-visible {
    outline: 4px solid #d40000 !important;
    outline-offset: 3px !important;
}

html.gh46-dark-contrast body,
html.gh46-dark-contrast body :where(main, section, article, aside, nav, header, footer, form, table, div:not(.gh46-accessibility__swatch)) {
    background-color: #000 !important;
    background-image: none !important;
    color: #fff !important;
    border-color: #fff !important;
    box-shadow: none !important;
    text-shadow: none !important;
}

html.gh46-dark-contrast body :where(h1, h2, h3, h4, h5, h6, p, li, dt, dd, span, small, strong, label, th, td) {
    color: #fff !important;
}

html.gh46-dark-contrast body a {
    color: #ffe600 !important;
    text-decoration: underline !important;
}

html.gh46-dark-contrast body :where(button, input, select, textarea) {
    border: 2px solid #fff !important;
    background: #000 !important;
    color: #fff !important;
}

html.gh46-dark-contrast body :focus-visible {
    outline: 4px solid #ffe600 !important;
    outline-offset: 3px !important;
}

html.gh46-dark-contrast .gh46-accessibility__panel,
html.gh46-dark-contrast .gh46-keyboard-help {
    color-scheme: dark;
}

html.gh46-stop-motion,
html.gh46-stop-motion body {
    scroll-behavior: auto !important;
}

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

/* --------------------------------------------------------------------------
   Humanized reveal motion — applied only after JavaScript is ready
   -------------------------------------------------------------------------- */
html.gh46-motion-ready:not(.gh46-stop-motion) [data-gh46-reveal] {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .56s cubic-bezier(.2, .7, .2, 1), transform .56s cubic-bezier(.2, .7, .2, 1);
    will-change: opacity, transform;
}

html.gh46-motion-ready:not(.gh46-stop-motion) [data-gh46-reveal].is-gh46-visible {
    opacity: 1;
    transform: none;
    will-change: auto;
}

html.gh46-motion-ready:not(.gh46-stop-motion) [data-gh46-reveal-delay="1"] { transition-delay: .05s; }
html.gh46-motion-ready:not(.gh46-stop-motion) [data-gh46-reveal-delay="2"] { transition-delay: .1s; }
html.gh46-motion-ready:not(.gh46-stop-motion) [data-gh46-reveal-delay="3"] { transition-delay: .15s; }
html.gh46-motion-ready:not(.gh46-stop-motion) [data-gh46-reveal-delay="4"] { transition-delay: .2s; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto !important; }
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
    [data-gh46-reveal] {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* --------------------------------------------------------------------------
   Responsive layout
   -------------------------------------------------------------------------- */
@media (max-width: 767.98px) {
    .gh46-accessibility {
        right: max(10px, env(safe-area-inset-right));
        bottom: max(12px, env(safe-area-inset-bottom));
    }

    .gh46-accessibility__launcher {
        width: 48px;
        height: 48px;
        border-radius: 13px;
    }

    .gh46-accessibility__top {
        width: 42px;
        height: 42px;
    }

    .gh46-accessibility__panel {
        position: fixed;
        right: 8px;
        left: 8px;
        bottom: 8px;
        width: auto;
        max-height: calc(100dvh - 16px);
        border-radius: 16px;
    }

    .gh46-accessibility__body {
        max-height: calc(100dvh - 166px);
    }

    .gh46-accessibility__help-row {
        grid-template-columns: 1fr;
    }

    .gh46-accessibility__footer {
        align-items: flex-start;
        flex-direction: column;
    }

    .gh46-keyboard-help__body dl > div {
        grid-template-columns: 1fr;
        gap: 7px;
    }
}

@media (max-width: 420px) {
    .gh46-accessibility__header {
        padding: 15px;
    }

    .gh46-accessibility__body {
        padding: 10px;
    }

    .gh46-accessibility__group {
        padding: 12px;
    }

    .gh46-accessibility__visual-grid {
        grid-template-columns: 1fr;
    }

    .gh46-accessibility__visual-grid button {
        grid-template-columns: auto 1fr;
        justify-items: start;
        min-height: 46px;
        text-align: left;
    }

    .gh46-accessibility__font-row {
        grid-template-columns: repeat(3, 1fr);
    }

    .gh46-accessibility__font-row output {
        grid-column: 1 / -1;
        justify-self: center;
    }
}

@media print {
    .gh46-accessibility,
    .gh46-keyboard-help {
        display: none !important;
    }

    [data-gh46-reveal] {
        opacity: 1 !important;
        transform: none !important;
    }
}

.gh46-keyboard-help.is-fallback-open {
    position: fixed;
    z-index: 2147482000;
    inset: 50% auto auto 50%;
    display: block;
    transform: translate(-50%, -50%);
}
