/* =====================================================================
   Accessibility Toolkit  – WCAG 2.1 / 2.2 AA
   Wealth Company website
   Brand-matched: black / gold (#D8A131), Poppins.
   - Floating launcher + shortcuts panel (profiles, individual toggles,
     text size, language switcher)
   - Dark / light site theme
   All rules namespaced .acc- / #acc- to avoid clashing with Tailwind.
   ===================================================================== */

:root {
    --acc-gold: #D8A131;
    --acc-gold-dark: #b9852279;
    --acc-dark: #191919;
    --acc-dark2: #2B2B2B;
    --acc-black: #000000;
    --acc-white: #ffffff;
    --acc-font: "Poppins", "Mona Sans", Arial, sans-serif;
}

/* ---- Skip to main content link (WCAG 2.4.1 Bypass Blocks) ---------- */
.acc-skip-link {
    position: absolute;
    left: 8px;
    top: -60px;
    z-index: 100000;
    background: var(--acc-dark);
    color: var(--acc-white);
    padding: 10px 18px;
    border: 2px solid var(--acc-gold);
    border-radius: 6px;
    font-family: var(--acc-font);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    transition: top 0.2s ease-in-out;
}
.acc-skip-link:focus {
    top: 8px;
    outline: 3px solid var(--acc-white);
    outline-offset: 2px;
}

/* ---- Visible focus indicator (WCAG 2.4.7 / 2.4.11) ---------------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
[role="button"]:focus-visible {
    outline: 3px solid var(--acc-gold) !important;
    outline-offset: 2px !important;
    border-radius: 2px;
}
html.acc-focus a:focus,
html.acc-focus button:focus,
html.acc-focus input:focus,
html.acc-focus select:focus,
html.acc-focus textarea:focus,
html.acc-focus [tabindex]:focus,
html.acc-focus [role="button"]:focus {
    outline: 4px solid var(--acc-gold) !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 3px var(--acc-white) !important;
}

/* =====================================================================
   Header dark / light theme toggle button
   ===================================================================== */
.wc-theme-toggle {
    background: transparent;
    border: 0;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    color: inherit;
}
.wc-theme-toggle svg { width: 26px; height: 26px; fill: currentColor; }
.wc-theme-toggle .acc-icon-sun { display: none; }
html.acc-light .wc-theme-toggle .acc-icon-sun { display: inline; }
html.acc-light .wc-theme-toggle .acc-icon-moon { display: none; }

/* =====================================================================
   Launcher button (brand: dark disc, gold glyph)
   ===================================================================== */
#acc-launcher {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 99998;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid var(--acc-gold);
    background: var(--acc-dark);
    color: var(--acc-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);
    transition: transform 0.15s ease, background 0.15s ease;
}
#acc-launcher:hover { background: var(--acc-gold); transform: scale(1.06); }
#acc-launcher svg { width: 32px; height: 32px; fill: var(--acc-gold); }
#acc-launcher:hover svg { fill: var(--acc-black); }

/* =====================================================================
   Panel
   ===================================================================== */
#acc-panel {
    position: fixed;
    bottom: 90px;
    left: 24px;
    z-index: 99999;
    width: 360px;
    max-width: calc(100vw - 32px);
    max-height: 82vh;
    overflow-y: auto;
    background: var(--acc-dark);
    color: var(--acc-white);
    border: 1px solid rgba(216, 161, 49, 0.4);
    border-radius: 14px;
    box-shadow: 0 12px 44px rgba(0, 0, 0, 0.55);
    font-family: var(--acc-font);
    font-size: 15px;
    line-height: 1.45;
}
#acc-panel[hidden] { display: none; }

.acc-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--acc-black);
    border-bottom: 2px solid var(--acc-gold);
    border-radius: 14px 14px 0 0;
}
.acc-panel-header h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--acc-gold);
}
#acc-close {
    background: transparent;
    border: 0;
    color: var(--acc-white);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
    border-radius: 4px;
}
#acc-close:hover { color: var(--acc-gold); }

.acc-panel-body { padding: 14px; }

.acc-section-title {
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--acc-gold);
    font-weight: 600;
    margin: 4px 0 8px;
}
.acc-section + .acc-section { margin-top: 16px; }

/* Profiles – full-width stacked buttons */
.acc-profiles { display: flex; flex-direction: column; gap: 8px; }
.acc-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    background: var(--acc-dark2);
    border: 2px solid transparent;
    border-radius: 10px;
    color: var(--acc-white);
    font-family: var(--acc-font);
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}
.acc-profile:hover { border-color: var(--acc-gold); }
.acc-profile[aria-pressed="true"] { background: var(--acc-gold); color: var(--acc-black); }
.acc-profile svg { width: 24px; height: 24px; fill: var(--acc-gold); flex: 0 0 auto; }
.acc-profile[aria-pressed="true"] svg { fill: var(--acc-black); }
.acc-profile small { display: block; font-weight: 400; font-size: 12px; opacity: 0.8; }

/* Grid of individual toggle buttons */
.acc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.acc-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 84px;
    padding: 10px 8px;
    background: var(--acc-dark2);
    border: 2px solid transparent;
    border-radius: 10px;
    color: var(--acc-white);
    font-family: var(--acc-font);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease;
}
.acc-option:hover { border-color: var(--acc-gold); }
.acc-option svg { width: 26px; height: 26px; fill: var(--acc-gold); }
.acc-option[aria-pressed="true"] {
    background: var(--acc-gold);
    border-color: var(--acc-gold);
    color: var(--acc-black);
}
.acc-option[aria-pressed="true"] svg { fill: var(--acc-black); }

/* Stepper row (text size) */
.acc-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--acc-dark2);
    border-radius: 10px;
    padding: 8px 10px;
}
.acc-stepper .acc-stepper-label { font-weight: 700; color: var(--acc-white); }
.acc-stepper .acc-stepper-controls { display: flex; align-items: center; gap: 8px; }
.acc-stepper button {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 2px solid var(--acc-gold);
    background: transparent;
    color: var(--acc-gold);
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
}
.acc-stepper button:hover { background: var(--acc-gold); color: var(--acc-black); }
.acc-stepper .acc-stepper-value { min-width: 46px; text-align: center; font-weight: 700; color: var(--acc-white); }

/* Language select */
.acc-lang-select {
    width: 100%;
    padding: 10px 12px;
    background: var(--acc-dark2);
    color: var(--acc-white);
    border: 2px solid var(--acc-gold);
    border-radius: 10px;
    font-family: var(--acc-font);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.acc-lang-select option { color: #000; }

.acc-reset {
    width: 100%;
    margin-top: 16px;
    padding: 11px;
    background: var(--acc-black);
    color: var(--acc-gold);
    border: 2px solid var(--acc-gold);
    border-radius: 10px;
    font-family: var(--acc-font);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}
.acc-reset:hover { background: var(--acc-gold); color: var(--acc-black); }

.acc-panel-footer {
    padding: 8px 12px 14px;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
}

/* =====================================================================
   User-selectable presentation adjustments (applied to <html>)
   ===================================================================== */

/* Text size — scale the ROOT font only, so rem-based Tailwind text AND
   spacing scale proportionally and the responsive layout is preserved.
   (No compounding on child elements.) */
html.acc-fontscale {
    font-size: calc(100% * var(--acc-font-scale, 1)) !important;
}

/* Text spacing (WCAG 1.4.12) */
html.acc-spacing p,
html.acc-spacing li,
html.acc-spacing a,
html.acc-spacing span,
html.acc-spacing td,
html.acc-spacing h1,
html.acc-spacing h2,
html.acc-spacing h3,
html.acc-spacing h4 {
    line-height: 1.8 !important;
    letter-spacing: 0.12em !important;
    word-spacing: 0.16em !important;
}
html.acc-spacing p { margin-bottom: 2em !important; }

/* Readable / dyslexia-friendly font */
html.acc-readable-font,
html.acc-readable-font body,
html.acc-readable-font * {
    font-family: Verdana, Tahoma, "Segoe UI", Arial, sans-serif !important;
    letter-spacing: 0.02em;
}
/* ...but keep icon fonts intact, otherwise ligature icons render as raw
   text such as "chevron_right". (Material Symbols / Material Icons / FontAwesome) */
html.acc-readable-font .material-symbols-outlined,
html.acc-readable-font .material-icons {
    font-family: "Material Symbols Outlined", "Material Icons" !important;
    letter-spacing: normal !important;
}
html.acc-readable-font .fa,
html.acc-readable-font [class^="fa-"],
html.acc-readable-font [class*=" fa-"] {
    font-family: "FontAwesome" !important;
    letter-spacing: normal !important;
}

/* High contrast */
html.acc-contrast body { background: #000 !important; color: #fff !important; }
html.acc-contrast p,
html.acc-contrast span,
html.acc-contrast li,
html.acc-contrast h1, html.acc-contrast h2, html.acc-contrast h3,
html.acc-contrast h4, html.acc-contrast h5, html.acc-contrast h6,
html.acc-contrast div, html.acc-contrast td, html.acc-contrast th,
html.acc-contrast label {
    color: #fff !important;
    background-color: transparent !important;
    text-shadow: none !important;
}
html.acc-contrast a, html.acc-contrast a * { color: #ffe600 !important; }
html.acc-contrast button,
html.acc-contrast input,
html.acc-contrast select,
html.acc-contrast textarea {
    background: #000 !important;
    color: #fff !important;
    border: 1px solid #fff !important;
}
/* keep the widget readable */
html.acc-contrast #acc-panel { background: var(--acc-dark) !important; }
html.acc-contrast #acc-panel .acc-option,
html.acc-contrast #acc-panel .acc-profile { color: #fff !important; }

/* Invert / negative colours */
html.acc-invert { filter: invert(1) hue-rotate(180deg); background: #fff; }
html.acc-invert img, html.acc-invert video, html.acc-invert iframe,
html.acc-invert #acc-launcher, html.acc-invert #acc-panel {
    filter: invert(1) hue-rotate(180deg);
}

/* Highlight links */
html.acc-links a {
    text-decoration: underline !important;
    outline: 2px solid var(--acc-gold) !important;
    outline-offset: 1px;
    background: rgba(216, 161, 49, 0.18) !important;
}

/* Hide images (keeps the accessibility widget's own UI visible) */
html.acc-hide-images img {
    display: none !important;
}

/* Show alt text badges (injected after each meaningful image) */
.acc-alt-badge {
    display: inline-block;
    background: var(--acc-dark);
    color: var(--acc-gold);
    border: 1px solid var(--acc-gold);
    border-radius: 6px;
    padding: 2px 8px;
    margin: 4px 0;
    font-family: var(--acc-font);
    font-size: 13px;
    line-height: 1.4;
    max-width: 100%;
    word-break: break-word;
    white-space: normal;
}
.acc-alt-badge::before {
    content: "ALT: ";
    font-weight: 700;
    opacity: 0.8;
}

/* Big cursor */
html.acc-cursor, html.acc-cursor * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' stroke='%23fff' stroke-width='1' d='M4 2l16 8-6 2-2 6z'/%3E%3C/svg%3E") 4 2, auto !important;
}

/* Pause animations / motion (WCAG 2.2.2) */
html.acc-pause *,
html.acc-pause *::before,
html.acc-pause *::after {
    animation-play-state: paused !important;
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
}
html.acc-pause [class*="marquee"], html.acc-pause marquee { animation: none !important; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* Reading guide */
#acc-reading-guide {
    position: fixed;
    left: 0;
    width: 100%;
    height: 26px;
    background: rgba(0, 0, 0, 0.55);
    border-top: 2px solid var(--acc-gold);
    border-bottom: 2px solid var(--acc-gold);
    z-index: 99997;
    pointer-events: none;
    display: none;
}
html.acc-guide #acc-reading-guide { display: block; }

/* Keyboard support for hover-only nav dropdowns (WCAG 2.1.1) */
.group:focus-within > .hidden { display: grid !important; }

/* Inline form validation errors (WCAG 3.3.1). Empty span takes no space. */
.acc-field-error:not(:empty) {
    display: block;
    margin-top: 4px;
    color: #ff6b6b;
    font-size: 14px;
    font-weight: 600;
}
.acc-field-error:not(:empty)::before {
    content: "\26A0";
    margin-right: 6px;
}
[aria-invalid="true"] {
    outline: 2px solid #ff6b6b !important;
    outline-offset: 1px;
}

/* Element currently being read aloud */
.acc-speaking {
    outline: 3px solid var(--acc-gold) !important;
    outline-offset: 2px !important;
    background: rgba(216, 161, 49, 0.15) !important;
}

/* =====================================================================
   Page structure dialog (section-wise outline)
   ===================================================================== */
#acc-structure {
    position: fixed;
    bottom: 90px;
    left: 24px;
    z-index: 99999;
    width: 360px;
    max-width: calc(100vw - 32px);
    max-height: 82vh;
    overflow-y: auto;
    background: var(--acc-dark);
    color: var(--acc-white);
    border: 1px solid rgba(216, 161, 49, 0.4);
    border-radius: 14px;
    box-shadow: 0 12px 44px rgba(0, 0, 0, 0.55);
    font-family: var(--acc-font);
    font-size: 15px;
}
#acc-structure[hidden] { display: none; }
#acc-structure .acc-panel-body { padding: 8px 6px 14px; }
.acc-struct-list { list-style: none; margin: 0; padding: 0; }
.acc-struct-list li { margin: 0; }
.acc-struct-link {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    border-left: 3px solid transparent;
    color: var(--acc-white);
    font-family: var(--acc-font);
    font-size: 14px;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 0 8px 8px 0;
}
.acc-struct-link:hover,
.acc-struct-link:focus-visible {
    background: var(--acc-dark2);
    border-left-color: var(--acc-gold);
}
.acc-struct-link .acc-struct-tag {
    display: inline-block;
    min-width: 30px;
    color: var(--acc-gold);
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
}
.acc-struct-h1 { padding-left: 12px; font-weight: 700; }
.acc-struct-h2 { padding-left: 24px; }
.acc-struct-h3 { padding-left: 40px; }
.acc-struct-h4 { padding-left: 56px; }
.acc-struct-h5, .acc-struct-h6 { padding-left: 72px; }
.acc-struct-landmark { color: var(--acc-gold); }
.acc-struct-empty { padding: 12px; color: rgba(255,255,255,0.6); }

/* Screen-reader-only utility */
.acc-sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* =====================================================================
   Light theme (toggled from the header). Best-effort remap of the
   site's dark Tailwind utilities to a light palette; gold accent kept.
   ===================================================================== */
html.acc-light body { background: #f4f4f5 !important; color: #1a1a1a !important; }
html.acc-light .bg-black { background: #ffffff !important; }
html.acc-light .bg-white\/10 { background: rgba(0, 0, 0, 0.05) !important; }
html.acc-light .bg-\[\#191919\] { background: #ffffff !important; }
html.acc-light .bg-\[\#2B2B2B\] { background: #f0f0f0 !important; }
html.acc-light .bg-\[\#2D2D2D\] { background: #e7e7e7 !important; }
html.acc-light .text-white { color: #1a1a1a !important; }
html.acc-light .text-white\/70 { color: #444444 !important; }
html.acc-light .text-white\/40 { color: #6b6b6b !important; }
html.acc-light .border-white\/10 { border-color: rgba(0, 0, 0, 0.12) !important; }
html.acc-light .bg-white\/10.border-white\/10,
html.acc-light .border-\[1px\] { border-color: rgba(0, 0, 0, 0.12) !important; }
/* Dividers */
html.acc-light .bg-white\/10.h-\[1px\] { background: rgba(0, 0, 0, 0.12) !important; }
/* Gold accents stay gold. Keep the a11y widget dark for contrast. */
html.acc-light #acc-panel { background: var(--acc-dark) !important; color: #fff !important; }
html.acc-light #acc-panel .text-white { color: #fff !important; }

/* Small screens: dock panel to a bottom sheet, keep responsive */
@media (max-width: 480px) {
    #acc-panel { left: 8px; right: 8px; bottom: 84px; width: auto; }
    #acc-launcher { bottom: 16px; left: 16px; }
}

/* =====================================================================
   Google Translate – neutralise its injected banner / tooltip so it
   does not shift the layout or break existing functionality.
   ===================================================================== */
.goog-te-banner-frame.skiptranslate,
.goog-te-gadget-icon,
#goog-gt-tt,
.goog-te-balloon-frame { display: none !important; }
body { top: 0 !important; }
.goog-text-highlight { background: none !important; box-shadow: none !important; }
#google_translate_element { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }
