/* Main-app Quan. The preview is the visual reference; this file only styles the live shell. */
#copilotModal .copilot-box,.workspace-quan-host .copilot-box{--ql-bg:#05080d;--ql-surface:#0b1119;--ql-surface-2:#101923;--ql-ink:#eef3f9;--ql-soft:#bdc9d6;--ql-muted:#9aaabc;--ql-line:#1b2735;--ql-line-strong:#2a3b4f;--ql-blue:#8dbbff;--ql-blue-soft:#162b45;--ql-up:#45d5a2;--ql-down:#ff7888;--ql-ring:#89baff;background:var(--ql-bg)!important;color:var(--ql-ink);border:1px solid var(--ql-line-strong)!important;border-radius:16px!important;box-shadow:0 24px 80px rgba(0,0,0,.48)!important;min-width:0;max-width:1080px!important;}
html[data-theme="light"] #copilotModal .copilot-box,html[data-theme="light"] .workspace-quan-host .copilot-box{--ql-bg:#f9fbfd;--ql-surface:#fff;--ql-surface-2:#f4f7fb;--ql-ink:#17263a;--ql-soft:#4d6075;--ql-muted:#687b90;--ql-line:#e0e7f0;--ql-line-strong:#cbd6e3;--ql-blue:#256bd2;--ql-blue-soft:#eaf2ff;--ql-up:#087a58;--ql-down:#bd4250;--ql-ring:#2782e9;box-shadow:0 24px 70px rgba(25,49,78,.16)!important;}
#copilotModal.copilot-layout-full .copilot-box{width:min(1080px,calc(100vw - 32px))!important;height:min(850px,calc(100dvh - 30px))!important;max-height:none!important}
.workspace-quan-host .copilot-box{border-radius:9px!important}
#copilotModal .copilot-header,.workspace-quan-host .copilot-header{min-height:66px;padding:0 20px;background:var(--ql-surface)!important;border-bottom:1px solid var(--ql-line)!important;gap:10px;backdrop-filter:none;-webkit-backdrop-filter:none}
#copilotModal .quan-title-logo,.workspace-quan-host .quan-title-logo{height:24px;max-width:180px;object-fit:contain}
#copilotModal .quan-live-wordmark,.workspace-quan-host .quan-live-wordmark{font-family:Georgia,"Times New Roman",serif;font-size:24px;font-weight:700;letter-spacing:-.045em;color:var(--ql-ink);white-space:nowrap}
#copilotModal .quan-live-wordmark span,.workspace-quan-host .quan-live-wordmark span{color:var(--ql-blue)}
#copilotModal .quan-live-wordmark em,.workspace-quan-host .quan-live-wordmark em{font-style:normal;color:var(--ql-soft)}
#copilotModal .quan-live-wordmark .quan-wordmark-brand,.workspace-quan-host .quan-live-wordmark .quan-wordmark-brand{color:var(--ql-ink)}
#copilotModal .quan-live-wordmark .quan-wordmark-brand span,.workspace-quan-host .quan-live-wordmark .quan-wordmark-brand span{color:var(--ql-blue)}
#copilotModal .version-dropdown-container,.workspace-quan-host .version-dropdown-container{margin-left:auto}
#copilotModal .version-btn,.workspace-quan-host .version-btn,#copilotModal .quan-style-button,.workspace-quan-host .quan-style-button{height:44px;display:flex;align-items:center;gap:7px;border:1px solid var(--ql-line-strong);border-radius:10px;background:transparent;color:var(--ql-ink);font-size:13px;font-weight:700;padding:0 10px;white-space:nowrap;cursor:pointer;box-shadow:none}
#copilotModal .version-btn:hover,.workspace-quan-host .version-btn,#copilotModal .quan-style-button:hover,.workspace-quan-host .quan-style-button:hover{background:var(--ql-surface-2)}
#copilotModal .version-chip-icon,.workspace-quan-host .version-chip-icon{width:31px;height:31px;object-fit:cover;border-radius:8px}
.quan-style-anchor{position:relative}
#copilotModal .version-dropdown-menu,.workspace-quan-host .version-dropdown-menu,.quan-style-menu{position:absolute;top:calc(100% + 6px);right:0;left:auto;width:260px;max-width:calc(100vw - 22px);padding:6px;border:1px solid var(--ql-line-strong);border-radius:11px;background:var(--ql-surface);box-shadow:0 20px 50px rgba(0,0,0,.25);z-index:70;display:none}
#copilotModal .version-dropdown-menu.show,.workspace-quan-host .version-dropdown-menu.show,.quan-style-menu.show{display:block}
#copilotModal .version-option,.workspace-quan-host .version-option,.quan-style-menu button{width:100%;min-height:56px;display:flex;align-items:center;gap:10px;padding:8px 10px;border:0;border-radius:7px;background:transparent;color:var(--ql-ink);text-align:left;cursor:pointer}
#copilotModal .version-option:hover,.workspace-quan-host .version-option:hover,.quan-style-menu button:hover,.quan-style-menu button[aria-checked="true"]{background:var(--ql-blue-soft)}
.version-option .version-option-mark{width:36px;height:36px;flex:none;object-fit:cover;border-radius:8px}
.version-option span,.quan-style-menu button{min-width:0}
.version-option strong,.quan-style-menu strong{display:block;font-size:13px;color:var(--ql-ink)}
.version-option small,.quan-style-menu small{display:block;margin-top:3px;font-size:11px;line-height:1.3;color:var(--ql-muted)}
#copilotModal .version-option[hidden],.workspace-quan-host .version-option[hidden],#quan35EarlyAccessBanner[hidden]{display:none!important}
#quan35EarlyAccessBanner{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:7px 12px 7px 20px;border-bottom:1px solid var(--ql-line-strong);background:var(--ql-blue-soft);color:var(--ql-ink);font-size:12px;font-weight:600;line-height:1.4}
#quan35EarlyAccessBanner button{display:grid;place-items:center;flex:none;width:44px;height:44px;border:0;border-radius:7px;background:transparent;color:var(--ql-soft);cursor:pointer}
#quan35EarlyAccessBanner button:hover{background:var(--ql-surface-2);color:var(--ql-ink)}
#quan35EarlyAccessBanner button svg{width:17px;height:17px}
.quan-menu-label{display:block;padding:8px 10px 3px;font-size:10px;font-weight:700;letter-spacing:.1em;color:var(--ql-muted)}
#copilotModal .copilot-layout-controls,.workspace-quan-host .copilot-layout-controls{background:transparent;border:1px solid var(--ql-line);border-radius:9px}
#copilotModal .copilot-layout-btn,.workspace-quan-host .copilot-layout-btn{width:36px;height:36px;border-radius:7px;color:var(--ql-muted)}
#copilotModal .copilot-layout-btn.active,.workspace-quan-host .copilot-layout-btn.active{background:var(--ql-blue-soft);color:var(--ql-blue);box-shadow:none}
#copilotModal .copilot-new-chat,#copilotModal .copilot-close,.workspace-quan-host .copilot-new-chat{width:44px;height:44px;border:1px solid var(--ql-line-strong);border-radius:10px;color:var(--ql-soft);background:transparent}
#copilotModal .copilot-new-chat:hover,#copilotModal .copilot-close:hover,.workspace-quan-host .copilot-new-chat:hover{background:var(--ql-surface-2);color:var(--ql-ink)}
#copilotModal .copilot-chat-area,.workspace-quan-host .copilot-chat-area{background:var(--ql-bg)!important;min-height:0;overscroll-behavior:contain;scroll-behavior:auto;gap:0;padding:0 clamp(18px,5vw,42px)}
#copilotModal .copilot-welcome,.workspace-quan-host .copilot-welcome{width:min(100%,690px);margin:auto;padding:48px 0;text-align:left}
#copilotModal .copilot-greeting,.workspace-quan-host .copilot-greeting{max-width:580px;margin:0 0 13px;font-family:"Iowan Old Style",Palatino,Georgia,serif;font-size:clamp(33px,4vw,48px);font-weight:500;line-height:1.12;letter-spacing:-.035em;color:var(--ql-ink);background:none;-webkit-text-fill-color:currentColor}
#copilotModal .copilot-sub-greeting,.workspace-quan-host .copilot-sub-greeting{max-width:540px;margin:0 0 27px;font-size:16px;line-height:1.5;color:var(--ql-soft);letter-spacing:0}
#copilotModal .copilot-chips,.workspace-quan-host .copilot-chips{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));max-width:none;gap:9px;margin:0;justify-content:initial}
#copilotModal .copilot-chips .chip,.workspace-quan-host .copilot-chips .chip{min-height:80px;display:flex;align-items:flex-start;padding:15px;border:1px solid var(--ql-line);border-radius:11px;background:var(--ql-surface);color:var(--ql-ink);font-size:13px;font-weight:600;line-height:1.35;text-align:left;letter-spacing:0;box-shadow:none;transform:none}
#copilotModal .copilot-chips .chip:hover,.workspace-quan-host .copilot-chips .chip:hover{border-color:var(--ql-blue);background:var(--ql-surface-2)}
#copilotModal .chat-bubble,.workspace-quan-host .chat-bubble{box-sizing:border-box;width:min(100%,690px);max-width:690px;align-self:center;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;color:var(--ql-soft);font-size:15px;line-height:1.62}
#copilotModal .chat-user,.workspace-quan-host .chat-user{width:fit-content;max-width:min(80%,690px);align-self:flex-end;margin:22px max(0px,calc((100% - 690px)/2)) 8px 0;padding:10px 13px;border:0;border-radius:11px 11px 3px 11px;background:var(--ql-surface-2);color:var(--ql-ink);font-size:14px;overflow-wrap:anywhere}
#copilotModal .chat-ai,.workspace-quan-host .chat-ai{margin:12px 0 20px;color:var(--ql-soft)}
#copilotModal .chat-ai b,.workspace-quan-host .chat-ai b{color:var(--ql-ink);font-weight:700}
#copilotModal .quan-response-content,.workspace-quan-host .quan-response-content{--qn-ink-hi:var(--ql-ink);--qn-soft:var(--ql-soft);--qn-muted:var(--ql-muted);--qn-steel:var(--ql-blue);--qn-hair:var(--ql-line);--qn-hair-2:var(--ql-line-strong);color:var(--ql-soft)}
#copilotModal .quan-response-content .chat-markdown-lead,.workspace-quan-host .quan-response-content .chat-markdown-lead{font-family:inherit!important;font-size:15px!important;line-height:1.62!important;font-weight:400;color:var(--ql-ink)!important;margin:0 0 14px!important}
#copilotModal .quan-response-content .chat-markdown-h2,.workspace-quan-host .quan-response-content .chat-markdown-h2{margin:25px 0 12px!important;color:var(--ql-ink)!important}
#copilotModal .quan-response-content .chat-markdown-h3,.workspace-quan-host .quan-response-content .chat-markdown-h3{color:var(--ql-ink)!important}
#copilotModal .quan-response-content .chat-markdown-li,.workspace-quan-host .quan-response-content .chat-markdown-li{color:var(--ql-soft)!important}
#copilotModal .quan-response-content .quan-source-pill,.workspace-quan-host .quan-response-content .quan-source-pill{display:inline-flex;max-width:190px;min-height:20px;padding:1px 6px!important;margin:0 2px!important;border:1px solid var(--ql-line-strong)!important;border-radius:4px!important;background:transparent!important;color:var(--ql-muted)!important;font-size:10px!important;font-weight:600!important;line-height:1.3;vertical-align:baseline;text-overflow:ellipsis;overflow:hidden;white-space:nowrap;box-shadow:none!important;transform:none!important}
#copilotModal .quan-source-pill:hover,.workspace-quan-host .quan-source-pill:hover{color:var(--ql-blue)!important;border-color:var(--ql-blue)!important}
#copilotModal .quan-source-dot,.workspace-quan-host .quan-source-dot{width:5px;height:5px;flex:0 0 5px;background:var(--ql-blue);box-shadow:none}
#copilotModal .quan-answer-highlight,.workspace-quan-host .quan-answer-highlight{padding:1px 3px;border:0;border-radius:3px;background:var(--ql-blue-soft);color:var(--ql-ink);box-shadow:none;font-weight:600}
#copilotModal .hl-pct-pos,.workspace-quan-host .hl-pct-pos{color:var(--ql-up);font:inherit;font-weight:700}
#copilotModal .hl-pct-neg,.workspace-quan-host .hl-pct-neg{color:var(--ql-down);font:inherit;font-weight:700}
#copilotModal .quan-limit-banner,.workspace-quan-host .quan-limit-banner{background:var(--ql-surface-2);color:var(--ql-ink);border-color:var(--ql-line-strong);font-weight:500}
#copilotModal .deep-research-prompt-card,.workspace-quan-host .deep-research-prompt-card{background:var(--ql-surface-2)!important;color:var(--ql-ink)!important;border-color:var(--ql-line-strong)!important}
#copilotModal .deep-research-prompt-card p,.workspace-quan-host .deep-research-prompt-card p{color:var(--ql-soft)!important}
#copilotModal .deep-research-prompt-card button,.workspace-quan-host .deep-research-prompt-card button{min-height:44px;border-radius:8px!important}
#copilotModal .deep-research-prompt-card .btn-deep-no,.workspace-quan-host .deep-research-prompt-card .btn-deep-no{background:var(--ql-surface)!important;color:var(--ql-ink)!important;border-color:var(--ql-line-strong)!important}
#copilotModal .copilot-input-area,.workspace-quan-host .copilot-input-area{display:flex;flex-direction:column;align-items:stretch;gap:0;width:min(100% - 36px,740px);margin:0 auto max(12px,env(safe-area-inset-bottom));padding:9px 11px 7px;border:1px solid var(--ql-line-strong);border-radius:16px;background:var(--ql-surface)!important;backdrop-filter:none;-webkit-backdrop-filter:none;box-sizing:border-box}
#copilotModal .copilot-input,.workspace-quan-host .copilot-input{width:100%;min-height:40px;height:40px;max-height:112px;margin:0;padding:7px 9px;border:0;background:transparent!important;color:var(--ql-ink);font-size:16px;line-height:1.45;resize:none;box-shadow:none}
#copilotModal .copilot-input::placeholder,.workspace-quan-host .copilot-input::placeholder{color:var(--ql-muted)}
.quan-composer-actions{display:flex;align-items:center;gap:8px;min-height:44px}
.quan-composer-spacer{flex:1;min-width:0}
#copilotModal .copilot-attach,#copilotModal .copilot-send,.workspace-quan-host .copilot-attach,.workspace-quan-host .copilot-send{width:44px;height:44px;flex:0 0 44px;border-radius:10px}
#copilotModal .copilot-attach,.workspace-quan-host .copilot-attach{border:0;background:transparent;color:var(--ql-soft)}
#copilotModal .copilot-send,.workspace-quan-host .copilot-send{border:0;background:var(--ql-blue);color:var(--ql-bg)}
#copilotModal .copilot-send:disabled,.workspace-quan-host .copilot-send:disabled{opacity:.5;cursor:not-allowed}
.quan-focus-chip{display:inline-flex;align-items:center;gap:3px;min-height:30px;max-width:130px;padding:0 5px 0 10px;border:1px solid var(--ql-line);border-radius:8px;background:var(--ql-surface-2);color:var(--ql-ink);font-size:12px;font-weight:700;white-space:nowrap}
.quan-focus-chip[hidden]{display:none}
.quan-focus-chip button{display:grid;place-items:center;width:30px;height:30px;padding:0;border:0;background:transparent;color:var(--ql-muted);font-size:18px;cursor:pointer}
.quan-focus-chip button:hover{color:var(--ql-ink)}.quan-focus-chip button[hidden]{display:none}
.quan-visually-hidden{position:absolute!important;width:1px;height:1px;clip:rect(0,0,0,0);clip-path:inset(50%);overflow:hidden;white-space:nowrap}
#copilotModal :focus-visible,.workspace-quan-host :focus-visible{outline:3px solid var(--ql-ring);outline-offset:2px}
.quan-live-progress{display:flex;align-items:center;gap:10px;min-height:34px;color:var(--ql-muted);font-size:13px}
.quan-live-progress::before{content:"";width:7px;height:7px;flex:none;border-radius:50%;background:var(--ql-blue);animation:quan-live-breathe 1.5s ease-in-out infinite}
.quan-live-progress.is-done::before{display:none}
/* Q64: the verified quick answer shown while the full explanation is checked. */
.quan-preview-note{margin:0 0 10px;padding:6px 10px;border-left:2px solid var(--ql-blue);color:var(--ql-muted);font-size:12.5px;line-height:1.45}
.quan-inline-error{display:block;color:var(--ql-down);font-size:13px;line-height:1.5}
.quan-answer-actions{display:flex;justify-content:flex-end;min-height:36px;margin-top:10px}
.quan-copy-answer{display:grid;place-items:center;width:36px;height:36px;border:0;border-radius:8px;background:transparent;color:var(--ql-muted);cursor:pointer}
.quan-copy-answer:hover{background:var(--ql-blue-soft);color:var(--ql-blue)}
.quan-copy-answer svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.quan-mini-chart{margin:18px 0 0;padding:14px 0 0;border-top:1px solid var(--ql-line);color:var(--ql-ink)}
.quan-mini-chart-head,.quan-mini-chart-value{display:flex;align-items:baseline;flex-wrap:wrap;gap:6px 11px}
.quan-mini-chart-head{justify-content:space-between;align-items:center}
.quan-mini-chart-head strong{font-size:12px}
.quan-mini-chart-time{font-size:11px;color:var(--ql-muted)}
.quan-mini-chart-toggle{min-width:64px;min-height:44px;padding:0 7px;border:0;border-radius:8px;background:transparent;color:var(--ql-blue);font-size:11px;font-weight:700;cursor:pointer}
.quan-mini-chart-toggle:hover{background:var(--ql-blue-soft)}
.quan-mini-chart-value strong{font-size:19px;line-height:1.2;font-variant-numeric:tabular-nums}
.quan-mini-chart-change{font-size:12px;color:var(--ql-muted);font-weight:700}
.quan-mini-chart.is-up{--ql-chart:var(--ql-up)}.quan-mini-chart.is-down{--ql-chart:var(--ql-down)}.quan-mini-chart:not(.is-up):not(.is-down){--ql-chart:var(--ql-blue)}
.quan-mini-chart.is-up .quan-mini-chart-change,.quan-mini-chart.is-down .quan-mini-chart-change{color:var(--ql-chart)}
.quan-mini-chart svg{display:block;width:100%;height:54px;margin-top:8px;overflow:hidden}.quan-mini-chart.is-expanded svg{height:122px}.quan-mini-chart svg[hidden]{display:none}.quan-mini-chart path{fill:none;stroke:var(--ql-chart);stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.quan-mini-chart circle{fill:var(--ql-chart)}
.quan-mentioned-stocks{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin:16px 0 0;padding:12px 0 0;border-top:1px solid var(--ql-line)}
.quan-mentioned-label{width:100%;font-size:11px;font-weight:700;color:var(--ql-muted)}
.quan-mentioned-stock{display:inline-flex;align-items:center;gap:7px;min-height:36px;padding:4px 9px;border:1px solid var(--ql-line-strong);border-radius:7px;background:var(--ql-surface);color:var(--ql-soft);font-size:11px;cursor:pointer}
.quan-mentioned-stock:hover{border-color:var(--ql-blue);color:var(--ql-ink)}
.quan-mentioned-stock strong{color:var(--ql-ink);font-size:11px}.quan-mentioned-stock small{font-size:10px;font-weight:700}.quan-mentioned-stock.is-up small{color:var(--ql-up)}.quan-mentioned-stock.is-down small{color:var(--ql-down)}
.quan-table-caption{margin:18px 0 7px;color:var(--ql-muted);font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}
#copilotModal .copilot-md-table-wrap,.workspace-quan-host .copilot-md-table-wrap{max-width:100%;overflow-x:auto;background:var(--ql-surface);border-color:var(--ql-line-strong);box-shadow:none}
#copilotModal .copilot-md-table,.workspace-quan-host .copilot-md-table{min-width:0;width:100%;table-layout:fixed;color:var(--ql-soft)}
#copilotModal .copilot-md-table th,.workspace-quan-host .copilot-md-table th{background:var(--ql-surface-2);color:var(--ql-ink);font-family:inherit;font-size:11px;font-weight:700;line-height:1.4;letter-spacing:.03em;text-transform:none;overflow-wrap:anywhere}
#copilotModal .copilot-md-table td,.workspace-quan-host .copilot-md-table td{color:var(--ql-soft);overflow-wrap:anywhere}
#copilotModal .copilot-md-table th,#copilotModal .copilot-md-table td,.workspace-quan-host .copilot-md-table th,.workspace-quan-host .copilot-md-table td{border-color:var(--ql-line);padding:10px 12px}
#copilotModal .copilot-md-table td:last-child,.workspace-quan-host .copilot-md-table td:last-child{color:var(--ql-soft);font-weight:400}
#copilotModal .chat-markdown-rule,.workspace-quan-host .chat-markdown-rule{height:1px;margin:18px 0;border:0;background:var(--ql-line)}
@keyframes quan-live-breathe{50%{opacity:.4;transform:scale(.85)}}
@media(max-width:768px){#copilotModal{top:var(--quan-visible-top,0px)!important;bottom:auto!important;height:var(--quan-visible-height,100dvh)!important}#copilotModal .copilot-box{width:100vw!important;height:var(--quan-visible-height,100dvh)!important;max-height:none!important;border:0!important;border-radius:0!important}#copilotModal .copilot-header{min-height:59px;padding:0 11px!important;padding-top:max(0px,env(safe-area-inset-top))!important;gap:5px}#copilotModal .quan-title-logo{height:18px;max-width:115px}#copilotModal .version-btn,#copilotModal .quan-style-button{height:40px;padding:0 6px;font-size:12px}#copilotModal .version-chip-icon{width:29px;height:29px}#copilotModal .copilot-new-chat,#copilotModal .copilot-close{width:40px;height:40px;flex:none}#copilotModal .copilot-chat-area{padding:0 18px}#copilotModal .copilot-welcome{padding:46px 0}#copilotModal .copilot-greeting{font-size:35px}#copilotModal .copilot-chips{grid-template-columns:1fr;gap:8px}#copilotModal .copilot-chips .chip{min-height:54px;padding:13px}#copilotModal .chat-user{max-width:84%;margin-right:0}#copilotModal .chat-bubble{padding:0}#copilotModal .copilot-input-area{width:calc(100% - 24px);margin-bottom:max(9px,env(safe-area-inset-bottom));padding:8px 9px 6px}#copilotModal .quan-style-button{font-size:0;width:40px;justify-content:center}#copilotModal .quan-style-button::before{content:"☷";font-size:20px}#copilotModal .version-btn #versionLabel{display:none}#copilotModal .version-btn svg{display:none}}
@media(max-width:390px){#copilotModal .copilot-header{gap:4px}#copilotModal .quan-title-logo{max-width:95px}#copilotModal .version-btn{width:41px;justify-content:center}#copilotModal .version-chip-icon{width:27px;height:27px}}
#copilotModal .quan-style-button svg,.workspace-quan-host .quan-style-button svg{flex:none;color:var(--ql-muted)}
@media(max-width:768px){#copilotModal .quan-style-button{font-size:13px}#copilotModal .quan-style-button span{display:none}#copilotModal .quan-style-button::before{content:none}}
@media(max-width:768px){#copilotModal.copilot-layout-full .copilot-box,#copilotModal.copilot-layout-side .copilot-box,#copilotModal.copilot-layout-split .copilot-box{width:100vw!important;height:var(--quan-visible-height,100dvh)!important;max-width:none!important;max-height:none!important;margin:0!important;border:0!important;border-radius:0!important}}
@media(max-width:768px){#copilotModal .copilot-header{display:grid;grid-template-columns:minmax(0,1fr) repeat(4,40px);gap:5px;padding-inline:10px!important;box-sizing:border-box}#copilotModal .copilot-title{min-width:0;overflow:hidden}#copilotModal .version-dropdown-container,#copilotModal .quan-style-anchor{width:40px;margin:0}#copilotModal .version-btn{width:40px!important;justify-content:center}#copilotModal .copilot-md-table-wrap{overflow:visible;border:0;background:transparent}#copilotModal .copilot-md-table{display:block;min-width:0;width:100%}#copilotModal .copilot-md-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}#copilotModal .copilot-md-table tbody{display:grid;gap:8px}#copilotModal .copilot-md-table tr{display:block;padding:8px 11px;border:1px solid var(--ql-line-strong);border-radius:9px;background:var(--ql-surface)}#copilotModal .copilot-md-table td{display:flex;justify-content:space-between;gap:12px;padding:6px 0;border:0;font-size:13px;line-height:1.45;text-align:right}#copilotModal .copilot-md-table td+td{border-top:1px solid var(--ql-line)}#copilotModal .copilot-md-table td::before{content:attr(data-label);flex:0 0 33%;color:var(--ql-muted);font-size:10px;font-weight:700;text-align:left;overflow-wrap:anywhere}}
@media(max-width:360px){#copilotModal .quan-wordmark-brand{display:none}#copilotModal .quan-live-wordmark{font-size:19px}}
@media(max-width:768px){#copilotModal .copilot-layout-controls{display:none!important}}
@media(max-width:768px){#copilotModal .quan-live-wordmark{font-size:17px}}
@media(prefers-reduced-motion:reduce){.quan-live-progress::before{animation:none}#copilotModal .chip,#copilotModal button,.workspace-quan-host button{transition:none!important}}

/* Keep the iPhone status area part of the same solid chat surface. */
@media (max-width:768px) {
  #copilotModal {
    width:100%!important;
    overflow:hidden;
    background:#05080d!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
  }
  #copilotModal .copilot-box,
  #copilotModal.copilot-layout-full .copilot-box,
  #copilotModal.copilot-layout-side .copilot-box,
  #copilotModal.copilot-layout-split .copilot-box {
    box-sizing:border-box;
    width:100%!important;
    min-width:0;
    overflow:hidden;
  }
  #copilotModal .copilot-header {
    padding-top:max(12px,env(safe-area-inset-top))!important;
    background:var(--ql-surface)!important;
  }
  #copilotModal .copilot-chat-area {
    min-width:0;
    overflow-x:hidden;
    overflow-y:auto;
    scrollbar-width:none;
  }
  #copilotModal .copilot-chat-area::-webkit-scrollbar { display:none; }
  #copilotModal .quan-response-content { min-width:0; overflow-wrap:anywhere; }
}
@media (max-width:768px) and (display-mode:standalone) {
  #copilotModal .copilot-header {
    padding-top:calc(max(47px,env(safe-area-inset-top)) + 10px)!important;
  }
}
@media (max-width:768px) {
  html.ios-standalone #copilotModal .copilot-header {
    padding-top:calc(max(47px,env(safe-area-inset-top)) + 10px)!important;
  }
  html[data-theme="light"] #copilotModal { background:#f9fbfd!important; }
}
#copilotModal #quan34LightLimitBanner[hidden]{display:none!important}
#copilotModal #quan34LightLimitBanner{margin:8px 18px 4px;border-color:var(--ql-line-strong);border-radius:9px;background:var(--ql-blue-soft);color:var(--ql-ink);font-weight:500}
#copilotModal #quan34LightLimitBanner button{border:0;padding:0;background:none;color:var(--ql-blue);font:inherit;font-weight:700;text-decoration:underline;cursor:pointer}
/* 3.4L guest usage: badge from 50,000 tokens, sign-in prompt from 98% (2026-10-08) */
#copilotModal #quan34LightLimitBanner.q34l-guest{display:grid;gap:7px;padding:11px 13px;background:var(--ql-surface);border:1px solid var(--ql-line);box-shadow:0 1px 2px rgba(0,0,0,.06);font-weight:400;font-size:13px;line-height:1.4}
#copilotModal #quan34LightLimitBanner.q34l-guest-final{border-color:var(--ql-blue);background:var(--ql-blue-soft)}
#copilotModal .q34l-guest-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px}
#copilotModal .q34l-guest-head strong{font-weight:600;color:var(--ql-ink)}
#copilotModal .q34l-guest-pct{font-variant-numeric:tabular-nums;font-size:12px;font-weight:600;color:var(--ql-blue);white-space:nowrap}
#copilotModal .q34l-guest-meter{height:5px;border-radius:99px;background:var(--ql-surface-2);overflow:hidden}
#copilotModal .q34l-guest-meter span{display:block;height:100%;border-radius:inherit;background:var(--ql-blue);transition:width .3s ease}
#copilotModal #quan34LightLimitBanner.q34l-guest p{margin:0;color:var(--ql-muted)}
#copilotModal .q34l-guest-actions{display:flex;flex-wrap:wrap;gap:8px}
#copilotModal #quan34LightLimitBanner .q34l-guest-actions button{text-decoration:none;border-radius:7px;padding:6px 12px;font-size:12.5px;font-weight:600;line-height:1.2}
#copilotModal #quan34LightLimitBanner .q34l-guest-actions .q34l-guest-primary{background:var(--ql-blue);color:var(--ql-bg);border:1px solid var(--ql-blue)}
#copilotModal #quan34LightLimitBanner .q34l-guest-actions .q34l-guest-secondary{background:transparent;color:var(--ql-blue);border:1px solid var(--ql-line-strong)}
#copilotModal #quan34LightLimitBanner .q34l-guest-actions button:focus-visible{outline:2px solid var(--ql-ring,var(--ql-blue));outline-offset:2px}
@media (prefers-reduced-motion:reduce){#copilotModal .q34l-guest-meter span{transition:none}}
#copilotModal #quanSubmitError[hidden]{display:none!important}
#copilotModal #quanSubmitError{margin:8px 18px 4px;border-color:var(--ql-line-strong);border-radius:9px;background:var(--ql-surface-2);color:var(--ql-ink)}

/* Keep every control inside the narrow side and split chat headers. */
#copilotModal.copilot-layout-side .copilot-header,
#copilotModal.copilot-layout-split .copilot-header{
  display:grid;
  grid-template-columns:minmax(0,1fr) 44px 44px;
  grid-template-areas:"model new close" "style layout layout";
  gap:6px;
  padding:10px 12px;
}
#copilotModal.copilot-layout-side #expertiseToggle,
#copilotModal.copilot-layout-split #expertiseToggle{grid-area:model;min-width:0;margin:0}
#copilotModal.copilot-layout-side .quan-style-anchor,
#copilotModal.copilot-layout-split .quan-style-anchor{grid-area:style;min-width:0}
#copilotModal.copilot-layout-side .copilot-layout-controls,
#copilotModal.copilot-layout-split .copilot-layout-controls{grid-area:layout;justify-self:stretch;min-width:0;box-sizing:border-box;padding:2px;gap:2px}
#copilotModal.copilot-layout-side .copilot-layout-btn,
#copilotModal.copilot-layout-split .copilot-layout-btn{width:26px;height:32px}
#copilotModal.copilot-layout-side .copilot-new-chat,
#copilotModal.copilot-layout-split .copilot-new-chat{grid-area:new}
#copilotModal.copilot-layout-side .copilot-close,
#copilotModal.copilot-layout-split .copilot-close{grid-area:close}
