/* Shared pre-integration shell for Global Gateway and Future Desk. */

:root {
    color-scheme: dark;
    --global-cyan: #00e5ff;
    --global-violet: #7b61ff;
    --global-ink: #020611;
    --global-text: #d9e3ff;
}

body {
    font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    text-decoration: none;
}

.global-logo-image,
.global-brand-logo {
    display: block;
    flex: 0 0 auto;
    border: 1px solid rgba(0, 229, 255, .38);
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 22px rgba(0, 229, 255, .18);
}

.global-logo-image {
    width: 50px;
    height: 50px;
}

.logo .global-logo-copy {
    display: flex;
    flex-direction: column;
    background: none;
    color: #fff;
    animation: none;
    -webkit-text-fill-color: initial;
}

.global-logo-copy strong {
    font-size: 17px;
    line-height: 1.1;
    letter-spacing: .02em;
}

.global-logo-copy small {
    margin-top: 4px;
    color: rgba(120, 231, 249, .75);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .22em;
}

.global-nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sound-toggle {
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(0, 229, 255, .2);
    border-radius: 999px;
    color: rgba(227, 243, 255, .82);
    background: rgba(255, 255, 255, .045);
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 750;
    letter-spacing: .04em;
    transition: color .2s ease, border-color .2s ease, background-color .2s ease, transform .2s ease;
}

.sound-toggle:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 229, 255, .42);
    color: #fff;
    background: rgba(0, 229, 255, .08);
}

.sound-toggle[aria-pressed="false"] {
    color: rgba(199, 211, 247, .55);
    border-color: rgba(255, 255, 255, .1);
}

[hidden] {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 100000;
    padding: 10px 14px;
    border-radius: 9px;
    color: #001018;
    background: var(--global-cyan);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
    transform: translateY(-150%);
    transition: transform .2s ease;
}

.skip-link:focus {
    transform: translateY(0);
}

:where(a, button, textarea):focus-visible {
    outline: 3px solid rgba(0, 229, 255, .95);
    outline-offset: 4px;
}

.noscript-message {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 10000;
    max-width: 430px;
    padding: 14px 18px;
    border: 1px solid rgba(0, 229, 255, .35);
    border-radius: 12px;
    color: var(--global-text);
    background: rgba(3, 8, 24, .96);
}

.noscript-message a {
    color: var(--global-cyan);
}

/* Compact Future Desk connection header. */
.global-header {
    position: fixed;
    top: 20px;
    left: 50%;
    z-index: 10000;
    width: min(1180px, calc(100% - 40px));
    min-height: 66px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 10px 14px 10px 12px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 18px;
    background: rgba(4, 9, 28, .76);
    box-shadow: 0 18px 55px rgba(0, 0, 0, .32), inset 0 0 0 1px rgba(255, 255, 255, .03);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    transform: translateX(-50%);
}

.global-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    color: white;
    text-decoration: none;
}

.global-brand-logo {
    width: 42px;
    height: 42px;
}

.global-brand > span:last-child {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.global-brand strong {
    font-size: 14px;
    letter-spacing: .02em;
}

.global-brand small {
    margin-top: 2px;
    color: rgba(199, 211, 247, .52);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .19em;
}

.global-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.global-header-actions a {
    padding: 10px 13px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 10px;
    color: rgba(225, 234, 255, .78);
    background: rgba(255, 255, 255, .025);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .05em;
    text-decoration: none;
    transition: border-color .2s ease, color .2s ease, background .2s ease;
}

.global-header-actions a:hover {
    border-color: rgba(0, 229, 255, .28);
    color: var(--global-cyan);
    background: rgba(0, 229, 255, .05);
}

.future-desk-page {
    overflow-x: clip;
}

.future-desk-page :where(.goal-box, .future-results, .my-future-container, .roadmap-modal-card) {
    max-width: 100%;
}

.future-desk-page textarea {
    max-width: 100%;
}

.future-desk-page :where(button, a) {
    touch-action: manipulation;
}

.future-desk-page :where(.example-goal, #findPathBtn, .roadmap-open-btn, .roadmap-complete-btn, .roadmap-continue-btn, .roadmap-reset-btn, .retry-ai-btn, .future-start-btn, .continue-future-btn, .continue-saved-roadmap-btn):focus-visible {
    outline: 3px solid rgba(0, 229, 255, .9);
    outline-offset: 3px;
}

@media (max-width: 640px) {
    .global-header {
        top: 10px;
        width: calc(100% - 20px);
        min-height: 58px;
        padding: 8px;
        border-radius: 15px;
    }

    .global-brand-logo {
        width: 38px;
        height: 38px;
    }

    .global-brand strong {
        font-size: 12px;
    }

    .global-brand small {
        max-width: 145px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 8px;
    }

    .global-header-actions a {
        padding: 9px 10px;
        font-size: 0;
    }

    .global-header-actions a[data-route="gateway"]::before {
        content: "← Gateway";
        font-size: 10px;
    }

    .global-header-actions a[data-optional-route="mainHub"]::before {
        content: "Main Hub";
        font-size: 10px;
    }

    .future-desk {
        padding-top: 118px !important;
    }

    .goal-footer {
        align-items: stretch;
        flex-direction: column;
    }

    #findPathBtn {
        width: 100%;
        min-height: 48px;
    }

    .roadmap-modal {
        align-items: flex-end;
        padding: 10px;
    }

    .roadmap-modal-card {
        max-height: calc(100dvh - 20px);
        padding: 28px 20px 22px;
        border-radius: 18px;
    }
}

@media (max-width: 1000px) {
    .global-logo-image {
        width: 44px;
        height: 44px;
    }

    .global-logo-copy strong {
        font-size: 15px;
    }

    .sound-toggle {
        min-height: 40px;
        padding: 0 12px;
    }
}

@media (max-width: 520px) {
    .global-logo-copy small {
        display: none;
    }

    .global-logo-copy strong {
        max-width: 112px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 13px;
    }

    .sound-toggle {
        padding: 0 10px;
        font-size: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}
