/* Public Ask CEO interface — independent from the private audio player. */
.ceo-ask {
    --ceo-ask-gold: #c8aa56;
    --ceo-ask-gold-soft: #dfc973;
    --ceo-ask-paper: #eee9dc;
    position: fixed;
    right: 26px;
    bottom: 24px;
    z-index: 100003;
    font-family: "Outfit", Arial, sans-serif;
}

.ceo-ask[hidden] { display: none !important; }
.ceo-ask button,
.ceo-ask input { font: inherit; }

.ceo-ask .screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Quiet idle launcher. */
.ceo-ask__launcher {
    display: flex;
    align-items: center;
    width: 50px;
    height: 50px;
    min-height: 50px;
    padding: 5px;
    overflow: hidden;
    border: 1px solid rgba(209,181,95,.58);
    border-radius: 999px;
    background: rgba(12,12,11,.94);
    box-shadow: 0 10px 34px rgba(0,0,0,.34);
    color: #fff;
    cursor: pointer;
    transition: width .22s cubic-bezier(.22,.61,.36,1), transform .18s ease, border-color .18s ease, background-color .18s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.ceo-ask__launcher:hover,
.ceo-ask__launcher:focus-visible {
    width: 126px;
    transform: translateY(-2px);
    border-color: rgba(224,199,116,.95);
    background: rgba(18,17,14,.98);
    outline: none;
}
.ceo-ask__launcher-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 50%;
    border: 1px solid rgba(235,209,125,.55);
    background: radial-gradient(circle at 35% 30%, #d8c377 0, #a98d3f 48%, #6d5825 100%);
    box-shadow: inset 0 0 0 3px rgba(0,0,0,.17);
    color: #15130d;
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
}
.ceo-ask__launcher-copy {
    display: block;
    max-width: 0;
    margin-left: 0;
    overflow: hidden;
    opacity: 0;
    white-space: nowrap;
    text-align: left;
    line-height: 1.05;
    transition: max-width .2s ease, margin-left .2s ease, opacity .14s ease;
}
.ceo-ask__launcher:hover .ceo-ask__launcher-copy,
.ceo-ask__launcher:focus-visible .ceo-ask__launcher-copy {
    max-width: 72px;
    margin-left: 9px;
    opacity: 1;
}
.ceo-ask__launcher-copy strong {
    display: block;
    color: #fff;
    font-size: 7.5px;
    font-weight: 700;
    letter-spacing: .075em;
    text-transform: uppercase;
}
.ceo-ask__launcher-copy small { display: none; }
.ceo-ask.is-open .ceo-ask__launcher { opacity: 0; pointer-events: none; transform: translateY(6px); }

/*
 * Compact conversation panel.  The history owns the visual hierarchy; the
 * controls retreat to the bottom and options float above the conversation so
 * opening the cog never pushes the chat around.
 */
.ceo-ask__panel {
    position: absolute;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    width: min(350px, calc(100vw - 36px));
    height: min(590px, calc(100vh - 36px));
    min-height: 440px;
    padding: 15px 15px 12px;
    overflow: hidden;
    border: 1px solid rgba(209,181,95,.55);
    border-radius: 17px;
    background:
            radial-gradient(circle at 8% 0%, rgba(190,156,68,.075), transparent 34%),
            rgba(12,12,11,.988);
    box-shadow: 0 24px 70px rgba(0,0,0,.52);
    color: var(--ceo-ask-paper);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(.985);
    transform-origin: bottom right;
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.ceo-ask.is-open .ceo-ask__panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.ceo-ask__header {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 34px;
    margin-bottom: 8px;
}
.ceo-ask__title {
    min-width: 0;
    margin: 0;
    color: var(--ceo-ask-gold);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: .135em;
    text-transform: uppercase;
    white-space: nowrap;
}
.ceo-ask__header-actions {
    display: flex;
    align-items: center;
    gap: 2px;
}
.ceo-ask__settings-button,
.ceo-ask__close {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: rgba(255,255,255,.45);
    cursor: pointer;
    transition: color .15s ease, background-color .15s ease, transform .15s ease;
}
.ceo-ask__settings-button svg { width: 15px; height: 15px; fill: currentColor; }
.ceo-ask__close { font: 20px/1 Arial, sans-serif !important; }
.ceo-ask__settings-button:hover,
.ceo-ask__settings-button:focus-visible,
.ceo-ask__close:hover,
.ceo-ask__close:focus-visible {
    color: #fff;
    background: rgba(255,255,255,.055);
    outline: none;
}
.ceo-ask__settings-button:active,
.ceo-ask__close:active { transform: scale(.94); }
.ceo-ask__settings-button[aria-expanded="true"] {
    color: var(--ceo-ask-gold-soft);
    background: rgba(255,255,255,.045);
}

/* Compact floating options popover: no layout jump when opened. */
.ceo-ask__settings {
    position: absolute;
    z-index: 8;
    top: 52px;
    right: 14px;
    width: min(270px, calc(100% - 28px));
    margin: 0;
    padding: 12px 13px 11px;
    border: 1px solid rgba(255,255,255,.095);
    border-radius: 11px;
    background: rgba(20,20,18,.985);
    box-shadow: 0 16px 44px rgba(0,0,0,.48);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}
.ceo-ask__settings[hidden] { display: none !important; }
.ceo-ask__settings-heading {
    margin: 0 0 10px;
    color: rgba(255,255,255,.55);
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: .16em;
    text-transform: uppercase;
}
.ceo-ask__shortcut {
    display: grid;
    grid-template-columns: auto auto auto auto;
    align-items: center;
    justify-content: start;
    gap: 6px;
}
.ceo-ask__shortcut-label {
    color: rgba(255,255,255,.34);
    font-size: 10px;
    font-weight: 650;
    line-height: 1.2;
    letter-spacing: .105em;
    text-transform: uppercase;
}
.ceo-ask__shortcut-keys {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 0 6px;
    border: 1px solid rgba(216,188,102,.18);
    border-radius: 5px;
    background: rgba(255,255,255,.035);
    color: rgba(255,255,255,.64);
    font: 600 10px/1 "Outfit", Arial, sans-serif;
    white-space: nowrap;
}
.ceo-ask__shortcut-change,
.ceo-ask__shortcut-reset,
.ceo-ask__clear-history {
    min-width: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: rgba(216,189,107,.82) !important;
    font: 600 10px/1.25 "Outfit", Arial, sans-serif !important;
    letter-spacing: .02em;
    text-transform: none !important;
    cursor: pointer;
    text-decoration: none;
}
.ceo-ask__shortcut-change:hover,
.ceo-ask__shortcut-change:focus-visible,
.ceo-ask__shortcut-reset:hover,
.ceo-ask__shortcut-reset:focus-visible,
.ceo-ask__clear-history:hover,
.ceo-ask__clear-history:focus-visible {
    color: #fff1bd !important;
    outline: none;
}
.ceo-ask__shortcut-reset[hidden] { display: none !important; }
.ceo-ask__clear-history {
    display: block;
    width: 100%;
    margin-top: 11px !important;
    padding-top: 9px !important;
    border-top: 1px solid rgba(255,255,255,.065) !important;
    text-align: left;
}
.ceo-ask__privacy {
    margin: 7px 0 0;
    color: rgba(255,255,255,.25);
    font-size: 10px;
    line-height: 1.45;
    letter-spacing: .005em;
}

/*
 * Chat-style history. User questions sit to the right; CEO answers remain
 * unboxed on the left, keeping the archive voice calm and editorial.
 */
.ceo-ask__history {
    position: relative;
    flex: 1 1 auto;
    min-height: 210px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 13px 2px 18px;
    border-top: 1px solid rgba(255,255,255,.065);
    scrollbar-width: thin;
    scrollbar-color: rgba(200,170,86,.28) transparent;
    scroll-behavior: smooth;
}
.ceo-ask__history::-webkit-scrollbar { width: 6px; }
.ceo-ask__history::-webkit-scrollbar-track { background: transparent; }
.ceo-ask__history::-webkit-scrollbar-thumb { background: rgba(200,170,86,.24); border-radius: 999px; }
.ceo-ask__history-empty {
    display: grid;
    place-items: center;
    min-height: 100%;
    max-width: 210px;
    margin: 0 auto;
    color: rgba(255,255,255,.25);
    font-size: 14px;
    line-height: 1.5;
    text-align: center;
}
.ceo-ask__turn {
    display: flex;
    flex-direction: column;
    max-width: 90%;
}
.ceo-ask__turn.is-user {
    align-items: flex-end;
    margin-left: auto;
}
.ceo-ask__turn.is-ceo {
    align-items: flex-start;
    margin-right: auto;
}
.ceo-ask__turn.is-user + .ceo-ask__turn.is-ceo { margin-top: 28px; }
.ceo-ask__turn.is-ceo + .ceo-ask__turn.is-user { margin-top: 20px; }
.ceo-ask__turn-role { display: none; }
.ceo-ask__turn-copy {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.ceo-ask__turn.is-user .ceo-ask__turn-copy {
    max-width: 100%;
    padding: 7px 9px;
    border: 1px solid rgba(255,255,255,.075);
    border-radius: 12px 12px 4px 12px;
    background: rgba(255,255,255,.07);
    color: rgba(255,255,255,.9);
}
.ceo-ask__turn.is-ceo .ceo-ask__turn-copy {
    padding: 0 2px;
    color: rgba(238,233,220,.88);
}
.ceo-ask__turn-link {
    display: inline-block;
    margin: 6px 0 0 2px;
    color: #d8bd6b;
    font-size: 14px;
    line-height: 1.35;
    text-decoration: none;
    border-bottom: 1px solid rgba(216,189,107,.38);
}
.ceo-ask__turn-link:hover,
.ceo-ask__turn-link:focus-visible { color: #fff1bd; border-bottom-color: currentColor; outline: none; }
.ceo-ask__turn-copy.is-typing::after {
    content: "";
    display: inline-block;
    width: 1px;
    height: .9em;
    margin-left: 2px;
    vertical-align: -.08em;
    background: rgba(216,189,107,.75);
    animation: ceo-ask-type-caret .8s steps(1,end) infinite;
}
@keyframes ceo-ask-type-caret { 0%,48% { opacity: 1; } 49%,100% { opacity: 0; } }

/* Composer: voice first, quiet typed fallback beneath it. */
.ceo-ask__voice-area {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    min-height: 128px;
    padding: 9px 0 5px;
    border-top: 1px solid rgba(255,255,255,.055);
}
.ceo-ask__mic {
    position: relative;
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    padding: 0;
    border: 1px solid rgba(216,188,102,.52);
    border-radius: 50%;
    background: radial-gradient(circle at 36% 30%, rgba(216,195,119,.13), rgba(200,170,86,.055) 55%, rgba(255,255,255,.02) 100%);
    color: var(--ceo-ask-gold-soft);
    cursor: pointer;
    box-shadow: 0 7px 20px rgba(0,0,0,.22), inset 0 0 0 3px rgba(0,0,0,.16);
    animation: ceo-ask-mic-breathe 2.9s ease-in-out infinite;
    transition: transform .16s ease, border-color .16s ease, color .16s ease, background-color .16s ease, box-shadow .16s ease;
}
.ceo-ask__mic::after {
    content: "";
    position: absolute;
    inset: -5px;
    border: 1px solid rgba(216,188,102,.11);
    border-radius: 50%;
    pointer-events: none;
}
.ceo-ask__mic svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.ceo-ask__mic:hover,
.ceo-ask__mic:focus-visible {
    border-color: rgba(235,211,136,.86);
    color: #f0d881;
    outline: none;
    transform: translateY(-1px) scale(1.025);
    box-shadow: 0 10px 25px rgba(0,0,0,.28), 0 0 0 4px rgba(216,188,102,.05), inset 0 0 0 3px rgba(0,0,0,.15);
}
.ceo-ask__mic:active { transform: translateY(0) scale(.95); }
.ceo-ask__mic.is-listening {
    color: #f0d881;
    border-color: rgba(240,216,129,.95);
    background: rgba(200,170,86,.13);
    animation: ceo-ask-mic-listening 1.05s ease-in-out infinite;
}
.ceo-ask__mic:disabled { opacity: .35; cursor: default; animation: none; }
@keyframes ceo-ask-mic-breathe {
    0%,100% { box-shadow: 0 7px 20px rgba(0,0,0,.22), 0 0 0 0 rgba(214,184,96,0), inset 0 0 0 3px rgba(0,0,0,.16); }
    50% { box-shadow: 0 8px 22px rgba(0,0,0,.24), 0 0 0 3px rgba(214,184,96,.05), inset 0 0 0 3px rgba(0,0,0,.16); }
}
@keyframes ceo-ask-mic-listening {
    0%,100% { box-shadow: 0 7px 21px rgba(0,0,0,.24), 0 0 0 0 rgba(214,184,96,.05), inset 0 0 0 3px rgba(0,0,0,.15); }
    50% { box-shadow: 0 9px 25px rgba(0,0,0,.25), 0 0 0 8px rgba(214,184,96,.11), inset 0 0 0 3px rgba(0,0,0,.15); }
}

.ceo-ask__form {
    flex: 0 0 auto;
    margin: 0;
}
.ceo-ask__input-row {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 6px;
}
.ceo-ask__input {
    min-width: 0;
    height: 27px;
    padding: 0 8px;
    border: 1px solid rgba(255,255,255,.11);
    border-radius: 6px;
    background: rgba(255,255,255,.038);
    color: rgba(255,255,255,.94);
    font-size: 15px !important;
    line-height: 27px;
    outline: none;
}
.ceo-ask__input::placeholder { color: rgba(255,255,255,.24); font-size: 15px; }
.ceo-ask__input:focus {
    border-color: rgba(216,188,102,.52);
    box-shadow: 0 0 0 2px rgba(200,170,86,.06);
}
.ceo-ask__submit {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 27px !important;
    min-width: 42px !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 8px !important;
    border: 1px solid #b99b4a !important;
    border-radius: 6px !important;
    background: linear-gradient(#c9ad5b, #a6883b) !important;
    box-shadow: none !important;
    color: #11100d !important;
    font: 500 12px/1 "Outfit", Arial, sans-serif !important;
    letter-spacing: .105em !important;
    text-transform: uppercase !important;
    cursor: pointer;
}
.ceo-ask__submit:hover,
.ceo-ask__submit:focus-visible { filter: brightness(1.08); outline: none; }
.ceo-ask__submit:active { transform: translateY(1px); }
.ceo-ask__submit:disabled { opacity: .48; cursor: wait; }

.ceo-ask__status {
    flex: 0 0 auto;
    min-height: 8px;
    margin: 3px 0 0;
    color: rgba(255,255,255,.29);
    font-size: 12px;
    line-height: 1.25;
    text-align: center;
}
.ceo-ask__status:empty { min-height: 0; margin-top: 0; }
.ceo-ask__status.is-error { color: #d8a7a0; }
.ceo-ask__status.is-listening { color: #d9c57c; }

@media (max-width: 620px) {
    .ceo-ask { right: 14px; bottom: 14px; }
    .ceo-ask__launcher { width: 46px; height: 46px; min-height: 46px; padding: 5px; }
    .ceo-ask__launcher-mark { width: 34px; height: 34px; flex-basis: 34px; }
    .ceo-ask__panel {
        position: fixed;
        left: 14px;
        right: 14px;
        bottom: 14px;
        width: auto;
        height: min(620px, calc(100vh - 28px));
        min-height: 0;
        padding: 14px 14px 11px;
        transform-origin: bottom center;
    }
    .ceo-ask__title { font-size: 9.3px; letter-spacing: .115em; }
    .ceo-ask__settings { top: 49px; right: 12px; width: min(270px, calc(100% - 24px)); }
    .ceo-ask__history { min-height: 170px; }
    .ceo-ask__voice-area { min-height: 118px; padding-top: 7px; }
    .ceo-ask__mic { width: 48px; height: 48px; }
}

@media (max-height: 610px) and (min-width: 621px) {
    .ceo-ask__panel { height: calc(100vh - 28px); bottom: -10px; }
    .ceo-ask__voice-area { min-height: 118px; padding: 5px 0 4px; }
    .ceo-ask__mic { width: 66px; height: 66px; }
}

@media (hover: none) and (pointer: coarse) {
    .ceo-ask__launcher:hover,
    .ceo-ask__launcher:focus:not(:focus-visible) { width: 46px; transform: none; }
    .ceo-ask__launcher:hover .ceo-ask__launcher-copy,
    .ceo-ask__launcher:focus:not(:focus-visible) .ceo-ask__launcher-copy {
        max-width: 0;
        margin-left: 0;
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ceo-ask__mic,
    .ceo-ask__mic.is-listening,
    .ceo-ask__turn-copy.is-typing::after { animation: none; }
    .ceo-ask__history { scroll-behavior: auto; }
}
