/* Telegram-inspired presentation; original LibreChat message/Markdown DOM preserved. */
/* Keep the navigation rail focused on conversations and documents. */
[data-testid="nav-panel-memories"] {display:none!important;}
/* Files uses the same fine, diagonal paperclip as the composer. */
[data-testid="nav-panel-files"]>svg {display:none!important;}
[data-testid="nav-panel-files"]::before {content:'';display:block;width:24px;height:24px;background:currentColor;mask:url('/alexys-icons/attach.svg') center/contain no-repeat;}
[data-testid="nav-panel-files"][aria-pressed="true"] {color:#168acd!important;background:#168acd14!important;}
/* Native search has no <main>; reserve space for the shared Alexys header. */
.bg-presentation:has(> .min-h-0 > [role="grid"]) {padding-top:70px!important;background:var(--alexys-bg)!important;}
.bg-presentation:has(> .min-h-0 > [role="grid"]) .agent-turn .mt-1.flex.gap-3 {position:static;opacity:1;pointer-events:auto;margin-top:6px;}
#alexys-search-history {display:none;}
@media(max-width:760px){body[data-alexys-page="search"] #alexys-search-history {display:flex;align-items:center;justify-content:center;position:fixed;left:8px;top:7px;z-index:35;width:40px;height:40px;border:1px solid #17334820;border-radius:12px;background:var(--alexys-bubble);color:var(--alexys-ink);font-size:20px;cursor:pointer;}}
@font-face {font-family:'Roboto';font-style:normal;font-weight:400;font-display:swap;src:url('/alexys-fonts/Roboto-Regular.woff2') format('woff2');}
@font-face {font-family:'Roboto';font-style:normal;font-weight:500 800;font-display:swap;src:url('/alexys-fonts/Roboto-Medium.woff2') format('woff2');}
body {--alexys-bg:#e8eef2;--alexys-ink:#000000;--alexys-blue:#168acd;--alexys-user:#effdde;--alexys-bubble:#f1f2f4;font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;}
html.dark body,body.dark {--alexys-bg:#17212b;--alexys-ink:#ecf1f5;--alexys-blue:#70b8e8;--alexys-user:#2b5278;--alexys-bubble:#182533;}
/* Telegram-like colour fields: warm lime, leafy green and deeper teal. */
main {background-color:#c6d4ab!important;background-image:url('/alexys-wallpaper.svg'),radial-gradient(ellipse at 100% 100%,#dce49b 0%,transparent 62%),radial-gradient(ellipse at 0% 100%,#86b783 0%,transparent 68%),radial-gradient(ellipse at 85% 0%,#6ca48f 0%,transparent 75%)!important;background-size:420px 420px,100% 100%,100% 100%,100% 100%;background-repeat:repeat,no-repeat,no-repeat,no-repeat;background-attachment:local;}
/* Dark mode: a flat, very dark grey (no wallpaper, no green). */
html.dark main,body.dark main {background-color:#121212!important;background-image:none!important;}
.m-auto:has(>.message-render .agent-turn) {padding-left:0!important;padding-right:0!important;}
.m-auto:has(>.message-render .user-turn) {padding-left:0!important;padding-right:0!important;}
.message-render:has(.agent-turn) {max-width:none!important;margin-left:20px!important;margin-right:20px!important;width:calc(100% - 40px)!important;padding-left:0!important;padding-right:0!important;}
.message-render:has(.user-turn) {max-width:none!important;margin-left:20px!important;margin-right:20px!important;width:calc(100% - 40px)!important;padding-left:0!important;padding-right:0!important;justify-content:flex-end!important;}
@media(max-width:760px){.message-render:has(.agent-turn){margin-left:10px!important;margin-right:10px!important;width:calc(100% - 20px)!important;}}
.message-render {margin-top:3px!important;margin-bottom:3px!important;}
.agent-turn {background:var(--alexys-bubble);border-radius:15px 15px 15px 4px;padding:4px 8px 5px!important;box-shadow:0 1px 2px #17334812;max-width:780px;color:var(--alexys-ink);}
.user-turn {background:transparent!important;padding:0!important;box-shadow:none;margin-left:auto!important;text-align:left;}
.user-turn .bg-surface-tertiary {background:var(--alexys-user)!important;padding:4px 8px 5px!important;border-radius:12px 12px 3px 12px!important;}
.user-turn .markdown {color:var(--alexys-ink)!important;text-align:left!important;}
.user-turn .w-full.flex.justify-end {position:absolute;right:0;top:100%;z-index:5;opacity:0;pointer-events:none;}
.user-turn:hover .w-full.flex.justify-end,.user-turn:focus-within .w-full.flex.justify-end {opacity:1;pointer-events:auto;}
.user-turn .flex.w-full.flex-col.gap-1 {gap:0!important;}
.agent-turn .markdown,.user-turn .markdown {font-family:'Roboto',Arial,sans-serif!important;font-size:13px;line-height:18px;font-weight:400;color:var(--alexys-ink);}
.agent-turn .markdown p {margin:0 0 .45em;}
.agent-turn .markdown p:last-child {margin-bottom:0;}
.agent-turn .markdown strong {font-weight:600;color:inherit;}
.agent-turn .markdown .alexys-section>strong {color:var(--alexys-blue);}
.agent-turn .markdown :is(h1,h2,h3) {font-size:1.08em;color:var(--alexys-blue);margin:1em 0 .45em;font-weight:750;}
.agent-turn .markdown li {margin:.1em 0;}
.agent-turn .markdown :is(ul,ol) {padding-left:1.25em;margin:.3em 0 .45em;}
.agent-turn .mt-1.flex.gap-3 {position:absolute;right:4px;bottom:-28px;z-index:5;opacity:0;pointer-events:none;}
.agent-turn:hover .mt-1.flex.gap-3,.agent-turn:focus-within .mt-1.flex.gap-3 {opacity:1;pointer-events:auto;}
.agent-turn .markdown blockquote {border-left:3px solid var(--alexys-blue);background:#168acd0b;padding:8px 12px;border-radius:0 8px 8px 0;}
.agent-turn .markdown a {color:var(--alexys-blue);text-underline-offset:3px;}
.agent-turn .markdown pre {border-radius:10px;font-size:13px;}
.agent-turn .markdown table {font-size:13px;display:block;overflow:auto;max-width:100%;}
#alexys-status {position:fixed;z-index:45;bottom:148px;left:calc(50% + 130px);transform:translateX(-50%);display:flex;align-items:center;gap:10px;background:var(--alexys-bubble);color:var(--alexys-blue);padding:9px 15px;border-radius:18px;box-shadow:0 2px 12px #14334c15;font-size:13px;pointer-events:none;}
#alexys-status[hidden] {display:none!important;}
#alexys-status .alexys-dots {display:inline-flex;gap:4px;align-items:center;height:14px;}
#alexys-status i {display:block;width:5px;height:5px;background:currentColor;border-radius:50%;animation:alexys-bounce 1.05s infinite ease-in-out;}
#alexys-status i:nth-child(2) {animation-delay:.14s;}#alexys-status i:nth-child(3) {animation-delay:.28s;}
@keyframes alexys-bounce {0%,60%,100%{transform:translateY(0);opacity:.4}30%{transform:translateY(-4px);opacity:1}}
/* The banner is the progress indicator: LibreChat's grey dot under the avatar (empty message) stays hidden. */
.result-thinking {display:none!important;}
.agent-turn[data-alexys-empty] {display:none!important;}
/* Native timestamps remain attached to their message, in the usual bottom-right position. */
.agent-turn,.user-turn {position:relative;}
.agent-turn {padding-bottom:24px!important;}
.user-turn [data-testid="message-body"] {padding-bottom:24px!important;}
.user-turn>h2.sr-only {position:static;width:0;height:0;overflow:visible;clip:auto;clip-path:none;font-size:0;}
.agent-turn time.message-timestamp,.user-turn time.message-timestamp {position:absolute;right:8px;bottom:5px;margin:0!important;font-size:11px;font-weight:400;line-height:14px;opacity:1!important;white-space:nowrap;}
#alexys-suggestions {position:fixed;z-index:24;left:calc(var(--alexys-chat-left,288px) + 20px);right:20px;bottom:70px;display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin:0 auto;max-width:600px;padding:0;}
@media(max-width:760px){#alexys-suggestions{left:10px;right:10px;bottom:64px;}}
#alexys-suggestions button {font-size:13px;padding:8px 13px;border-radius:16px;background:var(--alexys-bubble);border:1px solid #168acd35;color:var(--alexys-blue);cursor:pointer;}
#alexys-suggestions button:hover {background:#168acd15;}
button[aria-label="Tools Options"] {display:none!important;}
@media(max-width:760px){.agent-turn{padding:4px 8px 5px!important;max-width:100%;}.agent-turn .markdown{font-size:13px;}#alexys-status{left:50%;bottom:142px;white-space:nowrap;}.message-render{margin-top:3px!important;}}
/* Rectangular composer, native handlers, Telegram Web SVG controls. */
.bg-surface-chat:has(#prompt-textarea) {position:relative;padding:0 42px!important;border-radius:4px!important;min-height:44px;}
.bg-surface-chat:has(#prompt-textarea)>div:first-child>div:last-child:empty {display:none;}
.bg-surface-chat:has(#prompt-textarea)>div:last-child {position:absolute;inset:0;padding:0!important;gap:0!important;pointer-events:none;}
.bg-surface-chat:has(#prompt-textarea)>div:last-child>:not(:first-child):not(:last-child):not(#audio-recorder):not(.alexys-rec-ui) {display:none!important;}
.bg-surface-chat:has(#prompt-textarea)>div:last-child>div:first-child {position:absolute;left:5px;top:50%;transform:translateY(-50%);}
.bg-surface-chat:has(#prompt-textarea)>div:last-child>div:last-child {position:absolute;right:5px;top:50%;transform:translateY(-50%);}
.bg-surface-chat:has(#prompt-textarea) #audio-recorder {position:absolute;right:5px;top:50%;transform:translateY(-50%);}
.bg-surface-chat:has(#prompt-textarea) :is(:is(#attach-file-menu-button,#attach-file-button),#audio-recorder,#send-button,[data-testid="stop-generation-button"]) {display:flex!important;align-items:center;justify-content:center;width:34px!important;height:34px!important;padding:0!important;border-radius:4px!important;background:transparent!important;opacity:1!important;pointer-events:auto!important;color:#6f7e86!important;}
.bg-surface-chat:has(#prompt-textarea) :is(:is(#attach-file-menu-button,#attach-file-button),#audio-recorder,#send-button)::before {content:'';display:block;width:24px;height:24px;background:currentColor;mask-position:center;mask-size:contain;mask-repeat:no-repeat;}
:is(#attach-file-menu-button,#attach-file-button)::before {mask-image:url('/alexys-icons/attach.svg');}
#audio-recorder::before {mask-image:url('/alexys-icons/microphone.svg');}
#send-button::before {mask-image:url('/alexys-icons/send.svg');}
.bg-surface-chat:has(#prompt-textarea) #send-button {color:#3390ec!important;}
.bg-surface-chat:has(#prompt-textarea) :is(:is(#attach-file-menu-button,#attach-file-button),#audio-recorder,#send-button)>* {display:none!important;}
.bg-surface-chat:has(#prompt-textarea)[data-alexys-mode="voice"] #send-button,.bg-surface-chat:has(#prompt-textarea)[data-alexys-mode="send"] #audio-recorder,.bg-surface-chat:has(#prompt-textarea)[data-alexys-mode="stop"] :is(#audio-recorder,#send-button) {display:none!important;}
.bg-surface-chat:has(#prompt-textarea) :is(:is(#attach-file-menu-button,#attach-file-button),#audio-recorder):disabled {cursor:default!important;}
.bg-surface-chat:has(#prompt-textarea) #audio-recorder[data-alexys-insecure] {opacity:.35!important;cursor:not-allowed!important;}
#alexys-status {bottom:100px;}
@media(max-width:760px){#alexys-status{bottom:88px;}.bg-surface-chat:has(#prompt-textarea){border-radius:4px!important;}}
@media(prefers-reduced-motion:reduce){#alexys-status i{animation:none;opacity:.8;}}
#alexys-header {position:fixed;z-index:30;top:0;left:360px;right:0;height:55px;display:flex;align-items:center;gap:11px;padding:0 18px;background:color-mix(in srgb,var(--alexys-bubble) 95%,transparent);border-bottom:1px solid #17334810;pointer-events:none;}
#alexys-header .alexys-avatar {width:34px;height:34px;border-radius:50%;}
#alexys-header strong {display:block;color:var(--alexys-ink);font-size:15px;line-height:20px;}
#alexys-header small {display:block;color:#6d8395;font-size:11px;line-height:15px;}
main {padding-top:0!important;}
#alexys-header {right:56px;}
@media(max-width:760px){#alexys-header{left:52px;padding-left:9px;}#alexys-header .alexys-avatar{width:32px;height:32px;}}
/* Conversation folders replace endpoint robots without changing stored titles. */
nav [data-testid="convo-icon"]>:is(span,img,div) {display:none!important;}
nav [data-testid="convo-icon"]::after {content:'📁';font-size:16px;line-height:20px;}
.agent-turn [role="img"]:has(svg.lucide-bot) {background:url('/alexys-alexys-bolt.svg') center/contain no-repeat!important;width:19px!important;height:22px!important;}
.agent-turn [role="img"]>svg.lucide-bot {display:none!important;}
/* Scale the entire left workspace by 20%, preserving full viewport height. */
aside {zoom:.8;height:100%!important;}
aside nav [role="row"],aside nav [role="row"] :is(button,span),aside nav h2 {color:#4b5563!important;}
/* No footer panel: the composer sits directly on the wallpaper. */
main .bg-presentation:has(>form) {background:transparent!important;padding:0!important;min-height:64px;}
main form:has(#prompt-textarea) {position:fixed!important;left:calc(var(--alexys-chat-left,288px) + 20px);right:20px;bottom:10px!important;z-index:25;max-width:none!important;width:auto!important;padding:0!important;margin:0!important;}
#prompt-textarea {display:block;font-family:'Roboto',Arial,sans-serif!important;font-size:13px!important;line-height:18px!important;padding:12px 0!important;min-height:42px;}
@media(max-width:760px){main form:has(#prompt-textarea){left:10px;right:10px;bottom:8px!important;width:auto!important;margin:0!important;}.message-render:has(.user-turn){margin-left:10px!important;margin-right:10px!important;width:calc(100% - 20px)!important;}}
.alexys-conversation-section-heading,.alexys-date-heading {display:none!important;}
nav [data-pinned-section] {margin-bottom:0!important;padding-bottom:0!important;}
nav [data-testid="convo-unpin-button"] {display:inline-flex!important;opacity:1!important;visibility:visible!important;align-items:center;justify-content:center;align-self:center;width:24px!important;height:24px!important;padding:0!important;color:#7a8690;}
nav [data-testid="convo-unpin-button"]>svg {display:none!important;}
nav [data-testid="convo-unpin-button"]::before {content:'';width:16px;height:16px;display:block;background:currentColor;mask:url('/alexys-icons/pin.svg') center/contain no-repeat;}


/* No regenerate, edit or fork on a message: a regenerated or edited exchange would not match what the PSD
   kept, and a fork starts a conversation whose correspondence table is empty. */
button[data-testid="regenerate-generation-button"],
button[aria-label="Régénérer"], button[aria-label="Regenerate"],
button[aria-label="Modifier"], button[aria-label="Edit"],
button[aria-label="Ouvrir le menu de fork"], button[aria-label="Open fork menu"], button[aria-label="Fork"]{display:none!important}
/* No feedback thumbs either. The pinned app gives them no data-testid; in the hover bar only they carry aria-pressed. */
.agent-turn .mt-1.flex.gap-3 button[aria-pressed] {display:none!important;}
/* Welcome line of a new conversation: black on the light green background, also when the browser is dark. */
main p.split-parent, main p.split-parent span {color:#111!important;}
/* Replay of a dictation (stt flag, alexys-dictation.js): small control under the user message. */
/* Alexys submits dictation in its originating conversation. Disable the pinned LibreChat controls
   that schedule an independent delayed submission. */
:is(div.flex-col:has(> div #autoSendTextToggle), div.items-center:has(> #ConversationMode)) {display:none!important;}
/* Dictation, Telegram Web style (alexys-composer.js sets data-alexys-mic from LibreChat's aria-pressed). Idle: the
   timer and the bin are absent. Recording: dot + timer in the field, red bin instead of the clip, blue send circle. */
.alexys-rec-ui {display:none!important;}
.bg-surface-chat:has(#prompt-textarea) #audio-recorder {touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;transition:background-color .15s,color .15s;}
.bg-surface-chat:has(#prompt-textarea)[data-alexys-mic="recording"] #prompt-textarea {visibility:hidden;}
.bg-surface-chat:has(#prompt-textarea)[data-alexys-mic="recording"] :is(#attach-file-menu-button,#attach-file-button) {visibility:hidden;}
.bg-surface-chat:has(#prompt-textarea)[data-alexys-mic="recording"] .alexys-rec-timer {display:flex!important;align-items:center;gap:8px;position:absolute;left:44px;top:50%;transform:translateY(-50%);font-size:15px;color:var(--alexys-ink);font-variant-numeric:tabular-nums;pointer-events:none;}
.alexys-rec-timer::before {content:'';width:10px;height:10px;border-radius:50%;background:#e53935;animation:alexys-rec-blink 1s infinite;}
.bg-surface-chat:has(#prompt-textarea)[data-alexys-mic="recording"] .alexys-rec-cancel {display:flex!important;align-items:center;justify-content:center;position:absolute;left:5px;top:50%;transform:translateY(-50%);width:34px;height:34px;padding:0;border:0;border-radius:50%;background:transparent;color:#e53935;cursor:pointer;pointer-events:auto;transition:background-color .15s,color .15s;}
.alexys-rec-cancel::before {content:'';width:24px;height:24px;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM8 9h8v10H8V9zm7.5-5l-1-1h-5l-1 1H5v2h14V4z'/%3E%3C/svg%3E") center/contain no-repeat;}
.alexys-rec-cancel:hover {background:#e539351a;}
.bg-surface-chat:has(#prompt-textarea)[data-alexys-mic="recording"] #audio-recorder {background:#3390ec!important;color:#fff!important;border-radius:50%!important;animation:alexys-rec-pulse 1.5s infinite ease-out;}
.bg-surface-chat:has(#prompt-textarea)[data-alexys-mic="recording"] #audio-recorder::before {mask-image:url('/alexys-icons/send.svg');width:20px;height:20px;}
/* hold released outside the composer cancels: shown while the pointer is out */
.bg-surface-chat:has(#prompt-textarea)[data-alexys-cancel-armed] .alexys-rec-cancel {background:#e53935;color:#fff;}
.bg-surface-chat:has(#prompt-textarea)[data-alexys-cancel-armed] #audio-recorder {background:#aab4bb!important;animation:none;}
.bg-surface-chat:has(#prompt-textarea)[data-alexys-cancel-armed] .alexys-rec-timer {color:#e53935;}
.bg-surface-chat:has(#prompt-textarea)[data-alexys-mic="transcribing"] #audio-recorder {pointer-events:none!important;color:#3390ec!important;}
.bg-surface-chat:has(#prompt-textarea)[data-alexys-mic="transcribing"] #audio-recorder::before {mask:none;background:none;width:18px;height:18px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:alexys-spin .75s linear infinite;}
@keyframes alexys-rec-pulse {0%{box-shadow:0 0 0 0 #3390ec66}70%{box-shadow:0 0 0 9px #3390ec00}100%{box-shadow:0 0 0 0 #3390ec00}}
@keyframes alexys-rec-blink {50%{opacity:.2}}
@keyframes alexys-spin {to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.bg-surface-chat #audio-recorder,.bg-surface-chat #audio-recorder::before,.alexys-rec-timer::before{animation:none!important;}}
/* no black focus ring left on the mic after a dictation (pointer); keyboard focus keeps a light background */
.bg-surface-chat:has(#prompt-textarea) #audio-recorder:focus {outline:none!important;--tw-ring-shadow:0 0 #0000;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-color:transparent;}
.bg-surface-chat:has(#prompt-textarea):not([data-alexys-mic="recording"]) #audio-recorder:focus-visible {background:#6f7e861f!important;}

/* live waveform while recording (alexys-composer.js draws it in currentColor) */
.bg-surface-chat:has(#prompt-textarea)[data-alexys-mic="recording"] .alexys-rec-wave {display:block!important;position:absolute;left:118px;width:calc(100% - 166px);top:50%;height:24px;transform:translateY(-50%);color:#3390ec;pointer-events:none;}
.bg-surface-chat:has(#prompt-textarea)[data-alexys-cancel-armed] .alexys-rec-wave {color:#e5393999;}
/* Voice note bubble, Telegram outgoing: round play button, waveform with the played part coloured, "00:34, 183.5 KB" */
.alexys-voice {display:flex;align-items:center;gap:10px;min-width:220px;max-width:300px;padding:2px 0 4px;}
.alexys-voice-play {flex:none;width:44px;height:44px;border:0;border-radius:50%;background:var(--alexys-voice,#4fae4e);cursor:pointer;display:flex;align-items:center;justify-content:center;}
.alexys-voice-play::before {content:'';width:0;height:0;margin-left:4px;border-style:solid;border-width:9px 0 9px 15px;border-color:transparent transparent transparent var(--alexys-voice-icon,#fff);}
.alexys-voice.playing .alexys-voice-play::before {width:4px;height:16px;margin:0;border:0;border-left:4px solid var(--alexys-voice-icon,#fff);border-right:4px solid var(--alexys-voice-icon,#fff);box-sizing:content-box;padding:0 2px;background:transparent;}
.alexys-voice.unavailable .alexys-voice-play {opacity:.45;cursor:not-allowed;}
.alexys-voice-body {flex:1;min-width:0;display:flex;flex-direction:column;gap:3px;}
.alexys-voice-wave {position:relative;height:24px;color:var(--alexys-voice-rest,#4fae4e66);}
.alexys-voice-wave svg {display:block;width:100%;height:24px;fill:currentColor;}
.alexys-voice-played {position:absolute;inset:0;color:var(--alexys-voice,#4fae4e);clip-path:inset(0 calc(100% - var(--p,0%)) 0 0);}
.alexys-voice-meta {font:12px/1.2 Roboto,Arial,sans-serif;color:var(--alexys-voice,#4fae4e);font-variant-numeric:tabular-nums;}
html.dark body,body.dark {--alexys-voice:#fff;--alexys-voice-icon:#2b5278;--alexys-voice-rest:#ffffff66;}
/* on the sent message: bubble first, transcript below with the mic like Telegram's transcription */
.alexys-voice-turn [data-testid="message-body"] {background:var(--alexys-user);padding:6px 10px 6px 8px;border-radius:12px 12px 3px 12px;}
.alexys-voice-turn .markdown p:first-child::before {content:'🎙️ ';}
/* pending: the same bubble on the right above the composer while the transcription runs */
#alexys-voice-pending {position:fixed;z-index:30;display:flex;flex-direction:column;align-items:flex-end;gap:4px;background:var(--alexys-user);padding:6px 10px 6px 8px;border-radius:12px 12px 3px 12px;box-shadow:0 1px 2px #0000001f;animation:alexys-voice-in .18s ease-out;}
#alexys-voice-pending .alexys-voice-status {align-self:stretch;display:flex;align-items:center;gap:6px;font:12px/1.2 Roboto,Arial,sans-serif;color:#6f7e86;}
#alexys-voice-pending .alexys-voice-status::before {content:'';width:10px;height:10px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;animation:alexys-spin .75s linear infinite;}
#alexys-voice-pending.failed .alexys-voice-status {color:#e53935;}
#alexys-voice-pending.failed .alexys-voice-status::before {display:none;}
@keyframes alexys-voice-in {from{transform:translateY(8px);opacity:0}}
body:has(#alexys-voice-pending) #alexys-suggestions {visibility:hidden;}
/* hold to talk: Telegram's hint in the field, the waveform moves right of it */
.bg-surface-chat:has(#prompt-textarea)[data-alexys-mic="recording"][data-alexys-holding] .alexys-rec-hint {display:block!important;position:absolute;left:118px;top:50%;transform:translateY(-50%);font:14px/1 Roboto,Arial,sans-serif;color:#6f7e86;white-space:nowrap;pointer-events:none;}
.alexys-rec-hint b {font-weight:400;}
.alexys-rec-hint i {display:none;font-style:normal;color:#e53935;}
[data-alexys-cancel-armed] .alexys-rec-hint b {display:none;}
[data-alexys-cancel-armed] .alexys-rec-hint i {display:inline;}
.bg-surface-chat:has(#prompt-textarea)[data-alexys-mic="recording"][data-alexys-holding] .alexys-rec-wave {left:400px;width:calc(100% - 448px);}
@media(max-width:760px){.bg-surface-chat:has(#prompt-textarea)[data-alexys-mic="recording"][data-alexys-holding] .alexys-rec-wave{display:none!important;}.alexys-rec-hint b{font-size:12px;}}
/* Alexys icon: the black disc fills LibreChat's round holder (no white ring around a smaller logo) */
.rounded-full:has(>img[src*="/assets/alexys.svg"]) {background:transparent!important;box-shadow:none!important;--tw-shadow:0 0 #0000;}
.rounded-full:has(>img[src*="/assets/alexys.svg"])::after,.rounded-full:has(>img[src*="/assets/alexys.svg"])::before {display:none!important;}
.rounded-full>img[src*="/assets/alexys.svg"] {width:100%!important;height:100%!important;}

/* ==== Alexys.ai look (trial, dev): ivory paper, Inter + Georgia, burgundy accent, square shapes ====
   Overrides the Telegram presentation above; remove this block to roll back. */
body {--alexys-bg:#faf9f6;--alexys-ink:#151515;--alexys-blue:#761d2b;--alexys-user:#f1e4e6;--alexys-bubble:#ffffff;--alexys-line:#d8d6d1;--alexys-muted:#5c5852;font-family:Inter,Arial,sans-serif!important;}
html.dark body,body.dark {--alexys-bg:#161514;--alexys-ink:#f3f1ec;--alexys-blue:#d79aa4;--alexys-user:#3a2328;--alexys-bubble:#1f1e1c;--alexys-line:#3a3834;--alexys-muted:#a8a39a;}
/* main keeps the green gradient (light) and the very dark grey (dark) set at the top of this file. */
.bg-presentation:has(> .min-h-0 > [role="grid"]) {background:var(--alexys-bg)!important;}
/* messages: hairline rectangles; the answer reads like a page, the question carries a burgundy rule */
.agent-turn {background:var(--alexys-bubble)!important;border:1px solid var(--alexys-line);border-radius:0!important;box-shadow:none!important;padding:14px 18px!important;max-width:820px;}
.user-turn .bg-surface-tertiary,.alexys-voice-turn [data-testid="message-body"],#alexys-voice-pending {background:var(--alexys-user)!important;border-radius:0!important;border-left:2px solid var(--alexys-blue);padding:8px 12px!important;box-shadow:none!important;}
.message-render {margin-top:8px!important;margin-bottom:8px!important;}
.agent-turn .markdown,.user-turn .markdown,#prompt-textarea {font-family:Inter,Arial,sans-serif!important;font-size:14px!important;line-height:1.65!important;color:var(--alexys-ink)!important;}
.agent-turn .markdown p {margin:0 0 .7em;}
.agent-turn .markdown :is(h1,h2,h3) {font-family:Georgia,'Times New Roman',serif;font-weight:400;font-size:1.3em;letter-spacing:-.02em;color:var(--alexys-ink);margin:1.1em 0 .5em;}
.agent-turn .markdown strong,.agent-turn .markdown .alexys-section>strong {color:var(--alexys-ink);font-weight:650;}
.agent-turn .markdown li::marker {color:var(--alexys-blue);}
.agent-turn .markdown a {color:var(--alexys-blue);text-underline-offset:4px;}
.agent-turn .markdown blockquote {border-left:2px solid var(--alexys-blue);background:transparent;border-radius:0;padding:4px 14px;font-family:Georgia,serif;font-size:1.05em;}
.agent-turn .markdown pre,.agent-turn .markdown code {border-radius:0!important;}
.agent-turn .markdown table {border-collapse:collapse;}
.agent-turn .markdown :is(th,td) {border:0;border-bottom:1px solid var(--alexys-line);padding:8px 10px;}
.agent-turn .markdown th {font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--alexys-muted);font-weight:600;}
.agent-turn [role="img"]:has(svg.lucide-bot) {filter:none;}
main p.split-parent,main p.split-parent span {font-family:Georgia,serif!important;color:var(--alexys-ink)!important;letter-spacing:-.02em;}
/* header */
#alexys-header {background:var(--alexys-bg)!important;border-bottom:1px solid var(--alexys-line)!important;height:56px;}
#alexys-header strong {font-family:Georgia,serif;font-weight:400;font-size:20px;letter-spacing:-.04em;}
#alexys-header small {color:var(--alexys-muted);}
body #psd-switch,body #skills-switch {border-radius:0!important;font:550 12px/1 Inter,Arial,sans-serif!important;padding:8px 14px!important;background:var(--alexys-bg)!important;border:1px solid #a9a7a1!important;color:var(--alexys-ink)!important;}
body #psd-switch[aria-pressed="true"],body #skills-switch[aria-pressed="true"] {background:#761d2b!important;border-color:#761d2b!important;color:#fff!important;}
body .psd-badge {border-radius:0!important;}
body .psd-text {border-radius:0!important;}
/* composer: a white rectangle on paper, burgundy send */
.bg-surface-chat:has(#prompt-textarea) {background:var(--alexys-bubble)!important;border:1px solid var(--alexys-line)!important;border-radius:0!important;box-shadow:none!important;}
.bg-surface-chat:has(#prompt-textarea):focus-within {border-color:var(--alexys-ink)!important;}
.bg-surface-chat:has(#prompt-textarea) #send-button,.bg-surface-chat:has(#prompt-textarea)[data-alexys-mic="transcribing"] #audio-recorder {color:var(--alexys-blue)!important;}
.bg-surface-chat:has(#prompt-textarea)[data-alexys-mic="recording"] #audio-recorder {background:#761d2b!important;border-radius:0!important;animation:none;}
.bg-surface-chat:has(#prompt-textarea)[data-alexys-mic="recording"] .alexys-rec-wave {color:var(--alexys-blue);}
.bg-surface-chat:has(#prompt-textarea) :is(#attach-file-menu-button,#attach-file-button,#audio-recorder,#send-button) {border-radius:0!important;}
/* suggestions and status: square, quiet */
#alexys-suggestions button {border-radius:0;background:var(--alexys-bubble);border:1px solid var(--alexys-line);color:var(--alexys-ink);font-family:Inter,Arial,sans-serif;}
#alexys-suggestions button:hover {border-color:var(--alexys-blue);color:var(--alexys-blue);background:var(--alexys-bubble);}
#alexys-status {border-radius:0;background:var(--alexys-bubble);border:1px solid var(--alexys-line);box-shadow:none;color:var(--alexys-blue);}
/* voice notes */
body {--alexys-voice:#761d2b;--alexys-voice-rest:#761d2b55;}
.alexys-voice-meta,#alexys-voice-pending .alexys-voice-status {font-family:Inter,Arial,sans-serif;}
/* sidebar: paper, dark ink, burgundy selection */
aside,aside nav,aside > div {background:var(--alexys-bg)!important;}
aside {border-right:1px solid var(--alexys-line);}
aside nav [role="row"],aside nav [role="row"] :is(button,span),aside nav h2 {color:var(--alexys-ink)!important;font-family:Inter,Arial,sans-serif;}
aside nav a,aside nav [role="row"] > * {border-radius:0!important;}
nav [data-testid="convo-icon"]::after {content:'';display:block;width:12px;height:14px;background:var(--alexys-blue);mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M18 3 7 18h8l-2 11 12-17h-9z'/%3E%3C/svg%3E") center/contain no-repeat;}
[data-testid="nav-panel-files"][aria-pressed="true"] {color:var(--alexys-blue)!important;background:#761d2b14!important;}
/* menus and dialogs from the app keep their structure, only squarer */
[role="menu"],[role="dialog"],[role="listbox"] {border-radius:0!important;}
/* Layout C: the edge writes the rail, the phone tabs and the header into the page (alexys-nav.html; alexys-nav.js
   wires them), so the first paint already has the final layout. LibreChat lives in a fixed box right of the rail and
   under the header; its icon column is hidden except the account button, moved to the bottom of the rail. */
#alexys-rail,#alexys-tabs,#alexys-thread {display:none;}
body[data-alexys-nav] {
 --alexys-top:env(safe-area-inset-top, 0px);
 --alexys-keyboard:var(--alexys-keyboard-inset, 0px);
 --alexys-home-indicator:max(0px, calc(env(safe-area-inset-bottom, 0px) - var(--alexys-keyboard)));
 --alexys-bottom:calc(var(--alexys-home-indicator) + var(--alexys-keyboard));
 --alexys-rail-edge:calc(72px + env(safe-area-inset-left, 0px));
 background:var(--alexys-bg)!important;
}
body[data-alexys-nav] #loading-container {background-color:var(--alexys-bg)!important;}
body[data-alexys-nav] #alexys-header {display:none!important;}
body[data-alexys-nav] #alexys-rail {display:flex;position:fixed;left:env(safe-area-inset-left, 0px);top:var(--alexys-top);bottom:var(--alexys-bottom);width:72px;z-index:1;flex-direction:column;align-items:center;gap:2px;padding:14px 0;background:#f0eee9;border-right:1px solid var(--alexys-line,#d8d6d1);font-family:Inter,Arial,sans-serif;}
html.dark body[data-alexys-nav] #alexys-rail,html.dark body[data-alexys-nav] #alexys-tabs,body.dark[data-alexys-nav] #alexys-rail,body.dark[data-alexys-nav] #alexys-tabs {background:#1b1a18;}
#alexys-rail a,#alexys-tabs a {display:flex;flex-direction:column;align-items:center;gap:5px;font-size:10.5px;font-weight:500;color:var(--alexys-muted,#5c5852);text-decoration:none;position:relative;}
#alexys-rail a {width:62px;padding:10px 0 8px;}
#alexys-rail a svg,#alexys-tabs a svg {width:20px;height:20px;}
#alexys-rail a:hover,#alexys-tabs a:hover {color:var(--alexys-ink,#151515);}
#alexys-rail a.is-on,#alexys-tabs a.is-on {color:var(--alexys-blue);}
#alexys-rail a.is-on::before {content:'';position:absolute;left:-5px;top:8px;bottom:8px;width:2px;background:var(--alexys-blue);}
#alexys-rail .alexys-rail-logo {color:var(--alexys-blue);margin-bottom:14px;padding:4px 0;}
#alexys-rail .alexys-rail-logo svg {width:22px;height:28px;}
body[data-alexys-nav] #alexys-thread {display:flex;position:fixed;top:var(--alexys-top);left:var(--alexys-rail-edge);right:env(safe-area-inset-right, 0px);height:56px;z-index:30;align-items:center;gap:12px;padding:0 12px 0 16px;background:var(--alexys-bg);border-bottom:1px solid var(--alexys-line,#d8d6d1);}
body[data-alexys-nav] #root {position:fixed!important;top:calc(57px + var(--alexys-top));left:var(--alexys-rail-edge);right:env(safe-area-inset-right, 0px);bottom:var(--alexys-bottom);width:auto!important;height:auto!important;margin:0!important;z-index:2;}
body[data-alexys-nav] #root div.relative.z-0:has(>aside) {z-index:2!important;}
body[data-alexys-nav] aside {zoom:1!important;}
body[data-alexys-nav] aside[style*="width: 52px"] {width:0!important;min-width:0!important;max-width:0!important;}
body[data-alexys-nav] aside>div>div:first-child {position:fixed!important;left:env(safe-area-inset-left, 0px);bottom:calc(12px + var(--alexys-bottom));top:auto!important;width:72px!important;height:auto!important;z-index:46;align-items:center;background:transparent!important;border:0!important;padding:0!important;}
body[data-alexys-nav] aside>div>div:first-child>:not(.mt-auto) {display:none!important;}
body[data-alexys-nav] aside nav [role="row"]:is(:hover,:focus-within),body[data-alexys-nav] aside nav [aria-current="page"] {border-radius:0!important;}
body[data-alexys-nav] #psd-switch,body[data-alexys-nav] #skills-switch {display:none!important;}
/* LibreChat's top bar over the messages (share, ephemeral, model): the Alexys header replaces it */
body[data-alexys-nav] main div.absolute.top-0.z-20[class*="h-[52px]"] {display:none!important;}
.alexys-head-button {width:36px;height:36px;display:flex;align-items:center;justify-content:center;border:1px solid transparent;background:transparent;color:var(--alexys-ink,#151515);cursor:pointer;flex:none;padding:0;}
.alexys-head-button svg {width:20px;height:20px;}
.alexys-head-button:hover {border-color:var(--alexys-line,#d8d6d1);}
.alexys-head-button.is-on,.alexys-head-button[aria-expanded="true"] {background:#761d2b14;color:var(--alexys-blue);}
#alexys-pane {color:var(--alexys-blue);}
#alexys-dots {margin-left:auto;}
#alexys-dots svg {width:18px;height:18px;}
#alexys-title {font-family:Georgia,'Times New Roman',serif;font-size:18px;letter-spacing:-.02em;color:var(--alexys-ink,#151515);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;}
#alexys-menu {position:fixed;top:calc(52px + var(--alexys-top));right:max(12px, env(safe-area-inset-right));z-index:70;width:250px;background:var(--alexys-bubble,#fff);border:1px solid var(--alexys-line,#d8d6d1);box-shadow:0 22px 40px -20px rgba(21,21,21,.35);padding:6px 0;font:13px/1.3 Inter,Arial,sans-serif;color:var(--alexys-ink,#151515);}
#alexys-menu[hidden] {display:none;}
#alexys-menu button {display:flex;align-items:center;gap:12px;width:100%;padding:11px 16px;border:0;background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer;}
#alexys-menu button:hover {background:#761d2b0f;}
#alexys-menu hr {border:0;border-top:1px solid var(--alexys-line,#d8d6d1);margin:6px 0;}
.alexys-menu-label {font-size:10.5px;letter-spacing:.1em;text-transform:uppercase;color:var(--alexys-muted,#5c5852);font-weight:600;padding:8px 16px 4px;}
.alexys-check {width:15px;height:15px;border:1px solid #a9a7a1;display:inline-flex;align-items:center;justify-content:center;font-size:11px;color:#fff;flex:none;}
.alexys-check.is-on {background:#761d2b;border-color:#761d2b;}
body[data-alexys-nav] main form:has(#prompt-textarea) {right:max(20px, env(safe-area-inset-right));bottom:calc(10px + var(--alexys-bottom))!important;}
@media (pointer:coarse) {
 body[data-alexys-nav] #prompt-textarea {font-size:16px!important;}
}
/* Phone chrome follows the safe areas and the visible viewport above the keyboard. */
@media(max-width:760px){
 body[data-alexys-nav] #alexys-rail {display:none;}
 body[data-alexys-nav] #alexys-thread {top:0;left:0;right:0;height:calc(54px + var(--alexys-top));box-sizing:border-box;padding:var(--alexys-top) max(6px, env(safe-area-inset-right)) 0 max(6px, env(safe-area-inset-left));gap:4px;}
 .alexys-head-button {width:44px;height:44px;}
 body[data-alexys-nav] #root {top:calc(55px + var(--alexys-top));left:env(safe-area-inset-left, 0px);right:env(safe-area-inset-right, 0px);bottom:calc(58px + var(--alexys-bottom));}
 body[data-alexys-nav] aside>div>div:first-child {position:static!important;width:auto!important;}
 body[data-alexys-nav] aside>div>div:first-child>:not(.mt-auto) {display:revert!important;}
 body[data-alexys-nav] [data-testid="header-open-sidebar-button"] {display:none!important;}
 body[data-alexys-nav] #alexys-tabs {display:flex;position:fixed;left:0;right:0;bottom:var(--alexys-keyboard);z-index:44;height:calc(58px + var(--alexys-home-indicator));box-sizing:border-box;padding:0 env(safe-area-inset-right, 0px) var(--alexys-home-indicator) env(safe-area-inset-left, 0px);background:#f0eee9;border-top:1px solid var(--alexys-line,#d8d6d1);font-family:Inter,Arial,sans-serif;}
 #alexys-tabs a {flex:1;justify-content:center;gap:3px;}
 #alexys-tabs a.is-on {box-shadow:inset 0 2px var(--alexys-blue);}
 /* LibreChat's app row uses an inline 100dvh height. Fit it between the Alexys header and tabs, then let
    the native composer band reserve the actual height of the draft and its attachments. */
 body[data-alexys-nav]:not([data-alexys-report-chat]) #root:has(main #prompt-textarea) {display:flex;flex-direction:column;}
 body[data-alexys-nav]:not([data-alexys-report-chat]) #root > .flex:has(main #prompt-textarea) {flex:1;min-height:0;height:auto!important;}
 body[data-alexys-nav]:not([data-alexys-report-chat]) main .bg-presentation:has(> form #prompt-textarea) {flex-shrink:0;padding:10px!important;}
 body[data-alexys-nav]:not([data-alexys-report-chat]) main form:has(#prompt-textarea) {position:relative!important;inset:auto!important;width:100%!important;}
 /* LibreChat's ProjectsSection in chat history. The row action that files a chat and the main Dossiers tab stay available. */
 body[data-alexys-nav] #chat-history-nav .flex.flex-col.px-3.text-sm:has(> .h-8 button > svg.lucide-folders) {display:none!important;}
 body[data-alexys-nav] #prompt-textarea {font-size:16px!important;}
 body[data-alexys-nav] #alexys-status {bottom:calc(130px + var(--alexys-bottom));}
 body[data-alexys-nav] #alexys-suggestions {bottom:calc(124px + var(--alexys-bottom));}
 body[data-alexys-nav]:not([data-alexys-report-chat]) main #alexys-status {position:static;transform:none;width:fit-content;max-width:100%;margin:0 auto 8px;white-space:normal;overflow-wrap:anywhere;}
 body[data-alexys-nav]:not([data-alexys-report-chat]) main #alexys-suggestions {position:static;margin:0 auto 8px;}
 body[data-alexys-nav] #alexys-menu {top:calc(52px + var(--alexys-top));right:max(6px, env(safe-area-inset-right));}
 body[data-alexys-page="search"] #alexys-search-history {top:calc(7px + var(--alexys-top));left:max(8px, env(safe-area-inset-left));}
}
/* sign-in pages (/login, /register, /forgot-password): LibreChat's green and teal tokens take the burgundy accent
   (RGB triplets, as LibreChat reads them); on the dark accent the submit text turns dark for contrast */
html:not(.dark) {--surface-submit:118 29 43;--surface-submit-hover:94 23 34;--accent-primary:118 29 43;--accent-primary-hover:94 23 34;}
html.dark {--surface-submit:215 154 164;--surface-submit-hover:229 183 190;--accent-primary:215 154 164;--accent-primary-hover:229 183 190;}
html.dark .bg-surface-submit.text-text-on-status {color:#161514!important;}
/* login card heading, French pages: the Alexys welcome replaces com_auth_welcome_back before the first paint.
   AuthLayout's <h1> also heads register, reset and 2FA; only /login puts LoginForm's fixed aria-label beside it.
   The hidden text leaves the accessibility tree; the visible pseudo-element names the heading. */
html[lang^="fr"] main div:has(> form[aria-label="Login form"]) > h1 {visibility:hidden;font-size:0;line-height:0;}
html[lang^="fr"] main div:has(> form[aria-label="Login form"]) > h1::before {
  content:"Bienvenue sur Alexys";
  display:block;
  visibility:visible;
  font-size:clamp(1.625rem, 5vw, 2.125rem);
  line-height:1.15;
}
/* ==== end Alexys.ai look ==== */
.agent-turn {padding-bottom:24px!important;}
/* Progress points of an answer (alexys-points.js): each its own message between the question and the answer */
div.alexys-points{display:flex;flex-direction:column;gap:10px;margin:12px 20px 4px;max-width:780px}
@media(max-width:760px){div.alexys-points{margin-left:10px;margin-right:10px}}
details.alexys-point{background:var(--alexys-bubble);border-radius:15px 15px 15px 4px;box-shadow:0 1px 2px #17334812;
  padding:6px 12px;color:var(--alexys-ink);font-family:'Roboto',Arial,sans-serif;font-size:13px;line-height:18px}
details.alexys-point>summary{cursor:pointer;font-weight:600;color:var(--alexys-blue);padding:2px 0}
details.alexys-point .alexys-point-body{padding-top:4px}
details.alexys-point .alexys-point-body p{margin:0 0 .45em}
details.alexys-point .alexys-point-body ul{margin:0 0 .45em;padding-left:1.2em}
/* Debug trace (dev, stg): what the Hermes PSD did, pseudonymized; folded, plain like the points, and shown only
   while the Skills view is on (off by default) */
html:not(.alexys-skills-on) details.alexys-point.alexys-trace{display:none}
details.alexys-point.alexys-trace>summary{font-weight:500;font-family:ui-monospace,Menlo,monospace;font-size:12px}
details.alexys-point.alexys-trace .alexys-point-body{white-space:pre-wrap;font-family:ui-monospace,Menlo,monospace;font-size:12px;
  overflow-wrap:anywhere}

/* Unavailable shell destinations retain their position without offering dead links. */
#alexys-rail a[aria-disabled="true"],#alexys-tabs a[aria-disabled="true"] {opacity:.5;cursor:default;}

/* LibreChat v0.8.8 MyFilesModal toolbar: Delete precedes the files-filter wrapper.
   DELETE /api/files is deliberately closed at the edge; keep filtering, browsing and downloads. */
div:has(> div #files-filter) > button:first-child {display:none !important;}

/* Conversations panel, three states cycled by the header toggle (alexys-nav.js sets body[data-alexys-pane]):
   expanded (compact rows, 30% narrower than LibreChat's 360px minimum), mini (rail of two-letter badges) and hidden
   (LibreChat's own collapse). Row heights are the same in both visible states: the virtualized list measures each row
   once, so only widths and visibility change between them. */
aside nav [role="region"] {padding-top:4px!important;padding-bottom:4px!important;}
aside nav [role="region"] > div:first-child > div {height:30px!important;}
aside nav [data-testid="convo-item"] {height:26px!important;min-height:0!important;}
aside nav [data-testid="convo-item"] > button {padding-top:0!important;padding-bottom:0!important;height:26px;}
aside nav div[class*="group/project-row"] {height:26px!important;}
aside nav div[class*="group/project-row"] > button {padding-top:0!important;padding-bottom:0!important;}
aside nav div.h-8:has(> button[aria-expanded]) {height:24px!important;}
aside nav [data-testid^="project-chats-loading"] > div {height:26px!important;}
/* Date headings are hidden from the first paint: the list measures them before alexys-sidebar.js can mark them. */
aside nav [data-testid="convo-list-row"] [role="gridcell"] > h2 {display:none!important;}
@media(min-width:761px){
 body[data-alexys-pane="expanded"] aside:not([style*="width: 52px"]) {width:252px!important;min-width:252px!important;max-width:252px!important;}
 body[data-alexys-pane="mini"] aside:not([style*="width: 52px"]) {width:60px!important;min-width:60px!important;max-width:60px!important;}
 body:is([data-alexys-pane="expanded"],[data-alexys-pane="mini"]) aside .cursor-col-resize {display:none!important;}
 /* mini: search is its magnifier only (a click opens the full panel on the field) */
 body[data-alexys-pane="mini"] aside nav [role="region"] > div:first-child {padding:0!important;justify-content:center;}
 body[data-alexys-pane="mini"] aside nav [role="region"] > div:first-child > div {flex:0 0 36px!important;width:36px;justify-content:center;}
 body[data-alexys-pane="mini"] aside nav [role="region"] > div:first-child :is(input,button) {display:none!important;}
 body[data-alexys-pane="mini"] aside nav svg.lucide-search {position:static!important;flex:none;width:18px!important;height:18px!important;}
 /* mini: conversations become badges over their (still clickable) row */
 body[data-alexys-pane="mini"] aside nav [data-testid="convo-list-row"] {padding-left:0!important;padding-right:0!important;}
 body[data-alexys-pane="mini"] aside nav [data-testid="convo-item"] > :not(button),
 body[data-alexys-pane="mini"] aside nav [data-testid="convo-item"] > button > * {display:none!important;}
 body[data-alexys-pane="mini"] aside nav [data-testid="convo-item"]::after,
 body[data-alexys-pane="mini"] aside nav div[class*="group/project-row"] > button::after {content:attr(data-alexys-badge);display:flex;align-items:center;justify-content:center;height:20px;border:1px solid var(--alexys-line,#d8d6d1);background:var(--alexys-bubble,#fff);color:var(--alexys-ink,#151515);font:600 10.5px/1 Inter,Arial,sans-serif;letter-spacing:.04em;pointer-events:none;}
 body[data-alexys-pane="mini"] aside nav [data-testid="convo-item"]::after {position:absolute;top:3px;left:50%;width:34px;transform:translateX(-50%);}
 /* mini: dossiers keep their folder icon, with the same badge beside it; headings and row actions give way */
 body[data-alexys-pane="mini"] aside nav div.h-8:has(> button svg.lucide-folders) {justify-content:center;padding:0!important;}
 body[data-alexys-pane="mini"] aside nav div.h-8:has(> button svg.lucide-folders) > button[aria-expanded] {display:none!important;}
 body[data-alexys-pane="mini"] aside nav div.px-3:has(div.h-8 > button svg.lucide-folders) {padding-left:0!important;padding-right:0!important;}
 body[data-alexys-pane="mini"] aside nav div[class*="group/project-row"] > :not(button),
 body[data-alexys-pane="mini"] aside nav div[class*="group/project-row"] > button > :not(svg.lucide-folder) {display:none!important;}
 body[data-alexys-pane="mini"] aside nav div[class*="group/project-row"] > button {justify-content:center;gap:3px;padding:0!important;}
 body[data-alexys-pane="mini"] aside nav div[class*="group/project-row"] > button > svg.lucide-folder {width:14px;height:14px;}
 body[data-alexys-pane="mini"] aside nav div[class*="group/project-row"] > button::after {width:26px;}
 body[data-alexys-pane="mini"] aside nav .pl-2:has([data-testid="convo-item"]) {padding-left:0!important;}
}
/* Case attachment links: the composer's paperclip, not an emoji. */
.agent-turn .markdown a[href*="/alexys/attachments/"] {display:inline-flex;align-items:center;gap:6px;}
.agent-turn .markdown a[href*="/alexys/attachments/"]::before {content:'';flex:none;width:18px;height:18px;background:currentColor;mask:url('/alexys-icons/attach.svg') center/contain no-repeat;}
/* Sign-in pages (LibreChat v0.8.8 AuthLayout, VerifyEmail): no theme and contrast toggles at the bottom left.
   Only the full ThemeSelector nests its toolbar (scheme toggle, Ctrl+Shift+T) in a second bottom-left absolute div. */
div.absolute.bottom-0.left-0 > div.bg-surface-primary > div.absolute.bottom-0.left-0:has(> button[aria-keyshortcuts="Ctrl+Shift+T"]) {display:none!important;}

/* Sign-in pages (alexys-auth-view.js marks <html> before the first paint): LibreChat's card alone, no Alexys chrome. */
html[data-alexys-view="auth"] :is(#alexys-rail,#alexys-tabs,#alexys-thread,#alexys-menu) {display:none!important;}
html[data-alexys-view="auth"] body[data-alexys-nav] #root {inset:0;}

/* The Reports shell supplies the topic navigation and the PDF list: the report conversation (RapportsPage sets
   body[data-alexys-report-chat] in its iframe) shows only the native composer, no transcript nor header. */
body[data-alexys-report-chat] {
 /* LibreChat writes its initial contrast palette inline on html. Give the retained composer and its
    attachment popovers their own inherited colors so changes in the parent work without a reload. */
 --report-ink: 21 21 21;
 --report-muted: 92 88 82;
 --report-surface: 255 255 255;
 --report-hover: 240 238 233;
 --report-edge: 216 214 209;
 --text-primary: var(--report-ink);
 --text-secondary: var(--report-muted);
 --text-tertiary: var(--report-muted);
 --text-muted: var(--report-muted);
 --text-inverted: var(--report-surface);
 --presentation: var(--report-surface);
 --surface-primary: var(--report-surface);
 --surface-secondary: var(--report-surface);
 --surface-chat: var(--report-surface);
 --surface-dialog: var(--report-surface);
 --surface-inverted: var(--report-ink);
 --surface-hover: var(--report-hover);
 --surface-hover-alt: var(--report-hover);
 --surface-active: var(--report-hover);
 --surface-composer-hover: var(--report-hover);
 --border-light: var(--report-edge);
 --ring-primary: var(--report-ink);
}
html.dark body[data-alexys-report-chat] {
 --report-ink: 243 241 236;
 --report-muted: 168 163 154;
 --report-surface: 31 30 28;
 --report-hover: 48 45 41;
 --report-edge: 58 56 52;
}
html.high-contrast body[data-alexys-report-chat] {
 --report-ink: 0 0 0;
 --report-surface: 255 255 255;
 --report-hover: 212 212 212;
 --report-muted: var(--report-ink);
 --report-edge: var(--report-ink);
 --alexys-ink: rgb(var(--report-ink));
 --alexys-bubble: rgb(var(--report-surface));
 --alexys-line: rgb(var(--report-edge));
}
html.high-contrast.dark body[data-alexys-report-chat] {
 --report-ink: 255 255 255;
 --report-surface: 0 0 0;
 --report-hover: 61 61 61;
}
html.high-contrast body[data-alexys-report-chat] .bg-surface-chat:has(#prompt-textarea)
 :is(#attach-file-menu-button,#attach-file-button,#audio-recorder:not([aria-pressed="true"])) {
 color: var(--alexys-ink) !important;
}
body[data-alexys-report-chat] :is(#alexys-rail, #alexys-tabs, #alexys-thread, #alexys-suggestions),
body[data-alexys-report-chat] #root aside,
body[data-alexys-report-chat] main :is(.message-render, div.absolute.top-0.z-20[class*="h-[52px]"]) {
 display: none !important;
}
body[data-alexys-report-chat] #root {
 inset: 0 !important;
}
body[data-alexys-report-chat] main {
 background: var(--alexys-report-canvas, var(--alexys-bg)) !important;
}
body[data-alexys-report-chat] main form:has(#prompt-textarea) {
 left: 10px !important;
 right: 10px !important;
 bottom: 10px !important;
}
@media(max-width:760px) {
 body[data-alexys-report-chat] main form:has(#prompt-textarea) {bottom:8px!important;}
}

/* LibreChat's AuthLayout puts the bolt in a separate row. Center the logo and login card as one stack. */
#root:has(form[aria-label="Login form"]) {
  overflow-y:auto;
}

.min-h-screen:has(> main > div > form[aria-label="Login form"]) {
  --alexys-login-bg:#ece1d2;
  --alexys-login-paper:255 252 247;
  --alexys-login-line:#cbbba9;
  --alexys-login-field:#aa9582;
  min-height:100dvh;
  justify-content:center;
  gap:20px;
  --login-gutter:clamp(16px, 5vw, 40px);
  padding:max(var(--login-gutter), env(safe-area-inset-top)) max(var(--login-gutter), env(safe-area-inset-right)) max(var(--login-gutter), env(safe-area-inset-bottom)) max(var(--login-gutter), env(safe-area-inset-left));
  background:var(--alexys-login-bg);
}

html.dark .min-h-screen:has(> main > div > form[aria-label="Login form"]) {
  --alexys-login-bg:#211c18;
  --alexys-login-paper:40 34 29;
  --alexys-login-line:#594a3c;
  --alexys-login-field:#8b7665;
}

.min-h-screen:has(> main > div > form[aria-label="Login form"]) div:has(> img[src="assets/logo.svg"]) {
  height:48px;
  margin:0;
}

html.dark .min-h-screen:has(> main > div > form[aria-label="Login form"]) img[src="assets/logo.svg"] {
  filter:invert(1);
}

.min-h-screen:has(> main > div > form[aria-label="Login form"]) > [role="contentinfo"]:empty {
  display:none;
}

main:has(> div > form[aria-label="Login form"]) {
  flex-grow:0;
  background:transparent!important;
}

main div:has(> form[aria-label="Login form"]) {
  --surface-primary:var(--alexys-login-paper);
  width:min(100%, 27rem);
  padding:clamp(20px, 5vw, 34px);
  border:1px solid var(--alexys-login-line);
  border-radius:20px;
  box-shadow:0 14px 40px #33201012;
}

main div:has(> form[aria-label="Login form"]) h1 {
  font-family:Georgia, "Times New Roman", serif;
  font-weight:400;
  letter-spacing:-.035em;
}

form[aria-label="Login form"] :is(input#email, input#password) {
  background-color:rgb(var(--alexys-login-paper));
  border-radius:10px;
}

form[aria-label="Login form"] :is(input#email, input#password):not([aria-invalid="true"], :focus) {
  border-color:var(--alexys-login-field);
}

form[aria-label="Login form"] button[data-testid="login-button"] {
  border-radius:10px;
}

form[aria-label="Login form"] :is(input, button, a):focus-visible {
  outline:2px solid rgb(var(--accent-primary));
  outline-offset:2px;
}
.alexys-prompt-controls,
.alexys-grid-controls {
  margin-block-start: .4rem;
  text-align: start;
}
.alexys-prompt-controls > button,
.alexys-grid-controls > button,
.alexys-prompt-catalog button,
.alexys-prompt-catalog input,
.alexys-prompt-catalog select {
  color: inherit;
  background: transparent;
  border: 1px solid currentColor;
  border-radius: .5rem;
  padding-block: .35rem;
  padding-inline: .65rem;
  max-inline-size: 100%;
}
.alexys-prompt-catalog {
  color: CanvasText;
  background: Canvas;
  inline-size: min(36rem, calc(100vw - 2rem));
  max-block-size: 85vh;
  overflow: auto;
  padding: 1rem;
  border: 1px solid currentColor;
  border-radius: .75rem;
  overflow-wrap: anywhere;
}
.alexys-prompt-catalog::backdrop { background: rgb(0 0 0 / .45); }
.alexys-prompt-catalog h2 { margin-block-end: .5rem; font-weight: 600; }
.alexys-prompt-catalog input { display: block; inline-size: 100%; margin-block: .75rem; }
.alexys-prompt-filters { display: flex; flex-wrap: wrap; gap: .5rem; }
.alexys-prompt-filters select { min-inline-size: 0; background: Canvas; }
.alexys-prompt-catalog ul { list-style: none; padding-inline-start: 0; }
.alexys-prompt-catalog li { border-block-start: 1px solid GrayText; padding-block: .75rem; }
.alexys-prompt-catalog p { margin-block-start: .35rem; }
.alexys-prompt-private { display: flex; flex-wrap: wrap; gap: .5rem; margin-block-start: .5rem; }
.alexys-prompt-private p { flex-basis: 100%; }
.alexys-prompt-private p:empty { display: none; }
.alexys-prompt-private [hidden] { display: none; }
.alexys-grid-controls button { overflow-wrap: anywhere; white-space: normal; }
.alexys-grid-controls dialog input[hidden] { display: none; }
.alexys-grid-controls dialog button { margin-inline-end: .5rem; margin-block-start: .75rem; }
