/* Luma shares the workspace's paper, ink and restrained plum palette. */
body.portal-luma-open{overflow:hidden}
.portal-luma-overlay{position:fixed;inset:0;z-index:100;background:#29252f50;backdrop-filter:blur(2px)}
.portal-luma-panel{--luma-paper:#f4f2eb;--luma-line:#e7e2e8;container:luma-panel / size;position:fixed;inset:0 0 auto auto;z-index:101;display:flex;flex-direction:column;width:min(500px,100vw);height:var(--workspace-viewport-height,100dvh);max-height:var(--workspace-viewport-height,100dvh);min-width:0;border-left:1px solid #ded8e1;background:#fff;box-shadow:-14px 0 64px #29202e12;overscroll-behavior:contain;overflow:hidden;color:var(--ink,#29282d)}
.portal-luma-header{display:flex;align-items:center;justify-content:space-between;gap:12px;flex:0 0 auto;min-height:86px;padding:18px 24px 15px;border-bottom:0;background:var(--luma-paper)}
.portal-luma-brand{display:flex;align-items:center;gap:11px;min-width:0}
.portal-luma-brand>img{width:43px;height:43px;flex:0 0 43px;object-fit:contain}
.portal-luma-brand>div{min-width:0}
.portal-luma-brand h2{display:block;margin:0;color:#29282d;font-size:21px;font-weight:600;line-height:1.25;letter-spacing:-.65px}
.portal-luma-brand .portal-luma-status{display:flex;align-items:center;gap:6px;max-width:220px;min-height:19px;margin-top:4px;color:#716777;font-size:11px;font-weight:400;line-height:1.5;overflow-wrap:anywhere}
.portal-luma-status::before{content:'';flex:0 0 5px;width:5px;height:5px;border-radius:50%;background:#aaa2ad}
.portal-luma-status[data-state=ready]::before{background:#43745a}
.portal-luma-status[data-state=busy]::before{background:var(--plum,#4b326e)}
.portal-luma-actions{display:flex;align-items:center;gap:3px;flex:0 0 auto}
.portal-luma-actions button{display:flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;padding:8px 9px;border:0;border-radius:11px;background:transparent;color:#6d6176;font-size:12px;line-height:1.4}
.portal-luma-actions button:hover:not(:disabled){background:#e9e4ec;color:var(--plum,#4b326e)}
.portal-luma-actions .icon{width:19px;height:19px;flex-basis:19px}
.portal-luma-modes{display:flex;flex:0 0 auto;gap:4px;margin:0;padding:0 24px 15px;border:0;background:var(--luma-paper)}
.portal-luma-modes .button{flex:1;min-width:0;min-height:44px;padding:9px 12px;border:1px solid transparent;border-radius:11px;background:transparent;color:#74687c;font-size:13px;font-weight:500;line-height:1.4}
.portal-luma-modes .button[aria-pressed=true]{border-color:#ded6e3;background:#fff;color:var(--plum,#4b326e);box-shadow:0 2px 6px #33273d04}
.portal-luma-modes .button:hover:not(:disabled){border-color:#ded6e3;background:#fff;color:var(--plum,#4b326e)}
.portal-luma-privacy{display:flex;align-items:center;justify-content:center;gap:7px;flex:0 0 auto;min-height:36px;padding:8px 20px;border-bottom:1px solid var(--luma-line);background:#fbfaf7;color:#736879;font-size:10px;line-height:1.5}
.portal-luma-privacy .icon{flex-basis:12px;width:12px;height:12px;stroke-width:1.5}
.portal-luma-privacy-separator{color:#a59ca9}
.portal-luma-context{display:flex;align-items:center;justify-content:space-between;gap:10px;flex:0 0 auto;margin:15px 22px 0;padding:8px 8px 8px 12px;border:1px solid #dfd5e8;border-radius:12px;background:#faf7fc;color:var(--plum,#4b326e);font-size:12px;line-height:1.55;overflow-wrap:anywhere}
.portal-luma-context>.icon{flex:0 0 18px;width:18px;height:18px;stroke-width:1.5}
.portal-luma-context-copy{flex:1;min-width:0}
.portal-luma-context-copy>span{display:block;margin-bottom:2px;color:#7b6a88;font-size:10px;line-height:1.4}
.portal-luma-context-copy>strong{display:block;font-size:12px;font-weight:500;line-height:1.55;overflow-wrap:anywhere}
.portal-luma-context .icon-button{flex:0 0 44px;width:44px;min-width:44px;height:44px;min-height:44px;padding:8px;border:0;border-radius:10px;font-size:22px;line-height:1}
.portal-luma-context .icon-button:hover{background:#efe8f4}
.portal-luma-messages{display:flex;flex:1 1 auto;flex-direction:column;gap:24px;min-width:0;min-height:0;padding:25px 24px 20px;overflow-y:auto;overscroll-behavior:contain;scroll-behavior:auto;scrollbar-width:thin;scrollbar-color:#d6cedc transparent}
.portal-luma-welcome{min-width:0;margin:3px 0 1px;padding:4px 0 2px;text-align:left}
.portal-luma-welcome-mark{width:47px;height:47px;margin:0 0 18px;object-fit:contain}
.portal-luma-welcome h3{max-width:330px;margin:0;color:#29282d;font-size:25px;font-weight:500;line-height:1.3;letter-spacing:-.8px}
.portal-luma-welcome p{max-width:350px;margin:12px 0 0;color:#736879;font-size:14px;line-height:1.75}
.portal-luma-suggestions{display:flex;flex:0 0 auto;flex-direction:column;gap:9px;min-width:0;margin:0;padding:0 0 5px}
.portal-luma-suggestions .portal-luma-suggestion{display:flex;align-items:center;justify-content:flex-start;gap:12px;width:100%;min-height:72px;padding:13px 14px;border:1px solid var(--luma-line);border-radius:13px;background:#fff;color:#51415e;text-align:left;line-height:1.5}
.portal-luma-suggestions .portal-luma-suggestion:hover{border-color:#cfc0da;background:#fcfafc}
.portal-luma-suggestion>.icon:first-child{flex:0 0 18px;width:18px;height:18px;color:#897895;stroke-width:1.5}
.portal-luma-suggestion>.icon:last-child{flex:0 0 16px;width:16px;height:16px;margin-left:auto;color:#97869f;stroke-width:1.5}
.portal-luma-suggestion-copy{flex:1;min-width:0}
.portal-luma-suggestion-copy>strong{display:block;color:#4d3c5a;font-size:13px;font-weight:500;line-height:1.55}
.portal-luma-suggestion-copy>span{display:block;margin-top:3px;color:#7b6c84;font-size:11px;line-height:1.55}
.portal-luma-message{min-width:0;margin:0;padding:0;color:#37313e}
.portal-luma-message.user{align-self:flex-end;width:fit-content;max-width:94%;padding:13px 16px;border:1px solid #e8e0ee;border-radius:16px 16px 4px 16px;background:#f4eff7;color:#42304f}
.portal-luma-role{display:flex;align-items:center;gap:7px;margin-bottom:8px;color:#7b6c85;font-size:11px;font-weight:500;line-height:1.5}
.portal-luma-message.assistant .portal-luma-role{color:var(--plum,#4b326e)}
.portal-luma-message.assistant .portal-luma-role::before{content:'';width:5px;height:5px;border-radius:50%;background:var(--plum,#4b326e)}
.portal-luma-text{font-size:15px;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word}
.portal-luma-text p+p{margin-top:13px}
.portal-luma-text ul,.portal-luma-text ol{padding-left:20px;margin:10px 0}
.portal-luma-text li+li{margin-top:6px}
.portal-luma-reference{display:inline-flex;align-items:center;justify-content:center;gap:5px;max-width:100%;min-width:44px;min-height:44px;margin:1px 3px;padding:5px 8px;border:1px solid #e3d9ea;border-radius:9px;background:#faf7fc;color:var(--plum,#4b326e);font-size:11px;line-height:1.5;vertical-align:middle;overflow-wrap:anywhere;text-align:left}
.portal-luma-reference:hover{border-color:#bca7ca;background:#efe8f4}
.portal-luma-message-state{margin-top:11px;color:#8a6525;font-size:11px;line-height:1.65}
.portal-luma-refs{display:flex;align-items:center;gap:5px 7px;flex-wrap:wrap;margin-top:15px;padding-top:10px;border-top:1px solid #ece7ef;color:#7b6c84;font-size:11px;line-height:1.5}
.portal-luma-refs>span{flex:1 1 100%;padding-bottom:2px}
.portal-luma-refs button,.portal-luma-refs a{display:inline-flex;align-items:center;gap:5px;max-width:100%;min-height:44px;margin:0;padding:7px 11px;border:1px solid #e3d9ea;border-radius:9px;background:#fff;color:var(--plum,#4b326e);font-size:11px;line-height:1.5;text-align:left;text-decoration:none;overflow-wrap:anywhere}
.portal-luma-refs button:hover,.portal-luma-refs a:hover{border-color:#c5b4d0;background:#f6f1f9}
.portal-luma-clear-confirm{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap;flex:0 0 auto;margin:15px 22px 0;padding:12px 14px;border:1px solid #e8dbbf;border-radius:12px;background:#fcf8ef}
.portal-luma-clear-confirm p{flex:1 1 100%;margin:0 0 3px;color:#7f632d;font-size:12px;line-height:1.6}
.portal-luma-clear-confirm .button{min-height:44px;padding:8px 11px;border-radius:8px;font-size:12px}
.portal-luma-composer{flex:0 0 auto;min-width:0;margin:0 22px;padding:14px 15px 12px;border:1px solid #dcd2e3;border-radius:16px;background:#fff;box-shadow:0 4px 14px #30223d04}
.portal-luma-composer:focus-within{border-color:#997ba9;box-shadow:0 0 0 3px #f0eaf4}
.portal-luma-composer textarea{display:block;width:100%;min-width:0;min-height:58px;max-height:136px;margin:0;padding:0;border:0;outline:0;resize:vertical;background:transparent;color:#37313e;font:400 14px/1.7 var(--font);letter-spacing:0}
.portal-luma-composer textarea::placeholder{color:#80708a;opacity:1}
.portal-luma-composer-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0;margin-top:10px}
.portal-luma-composer-actions .portal-luma-keyboard{max-width:168px;color:#80708a;font-size:10px;line-height:1.55}
.portal-luma-composer-actions .button{flex:0 0 auto;min-height:44px;padding:10px 13px;border-radius:10px;font-size:12px;line-height:1.5}
.portal-luma-composer-actions .button.primary{border-color:var(--plum,#4b326e);background:var(--plum,#4b326e);color:#fff}
.portal-luma-error{flex:0 0 auto;margin:0 22px 12px;padding:12px 14px;border:1px solid #e8c8c1;border-radius:12px;background:#fff7f4;color:#943f32;font-size:12px;line-height:1.65;overflow-wrap:anywhere}
.portal-luma-error button{min-height:44px;margin-top:6px;padding:7px 0;color:#873c31;font-size:12px;text-decoration:underline;text-underline-offset:4px}
.portal-luma-proposal{min-width:0;margin:0;padding:19px;border:1px solid #ded1e8;border-radius:17px;background:#fcfafd}
.portal-luma-eyebrow{display:block;margin-bottom:12px;color:#7c668d;font-size:10px;font-weight:500;line-height:1.6;letter-spacing:.04em}
.portal-luma-proposal>.portal-luma-eyebrow{display:inline-flex;min-height:25px;align-items:center;margin-bottom:13px;padding:3px 8px;border:1px solid #e3d7ea;border-radius:6px;background:#f4edf8;color:#78588f;letter-spacing:0}
.portal-luma-proposal>h3{margin:0;color:#3d294d;font-size:18px;font-weight:500;line-height:1.5;letter-spacing:-.3px;overflow-wrap:anywhere}
.portal-luma-proposal>p.portal-luma-text{margin:11px 0 17px;color:#6c5e76;font-size:13px;line-height:1.8}
.portal-luma-proposal-fields{display:grid;grid-template-columns:1fr 1fr;gap:14px 16px;min-width:0;margin:0;padding:0}
.portal-luma-proposal-fields>div{min-width:0;padding-top:12px;border-top:1px solid #e9e0ef}
.portal-luma-proposal-fields dt{margin-bottom:5px;color:#7a6a85;font-size:10px;line-height:1.5}
.portal-luma-proposal-fields dd{margin:0;color:#4b3c58;font-size:12px;line-height:1.7;overflow-wrap:anywhere;white-space:pre-wrap}
.portal-luma-proposal .button.primary{width:100%;min-height:46px;margin-top:17px;border-radius:10px;font-size:12px;white-space:normal}
.portal-luma-proposal>.portal-luma-disclaimer{margin:13px 0 0;padding:0;color:#7b6a86;font-size:11px;line-height:1.7}
.portal-luma-footnote{flex:0 0 auto;min-width:0;padding:2px 22px max(10px,env(safe-area-inset-bottom));text-align:center}
.portal-luma-info-button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;max-width:100%;padding:7px 10px;border:0;border-radius:8px;background:transparent;color:#7b6d84;font-size:10px;line-height:1.5;text-decoration:underline;text-decoration-color:#d0c4d8;text-underline-offset:4px}
.portal-luma-info-button:hover{background:#f6f2f8;color:var(--plum,#4b326e)}
.portal-luma-context-info{flex:0 0 auto;max-height:none;overflow:visible;margin:0;padding:14px 15px;border:1px solid #e7dfea;border-radius:12px;background:#faf7fb;color:#74637f;font-size:12px;line-height:1.8;text-align:left;overflow-wrap:anywhere}
.portal-luma-panel button:focus-visible{outline:2px solid #9974af;outline-offset:3px}

@media(max-width:760px){
  .portal-luma-panel{width:100%;height:var(--workspace-viewport-height,100dvh);max-height:var(--workspace-viewport-height,100dvh);border-left:0;border-radius:0;box-shadow:none}
  .portal-luma-overlay{background:#29252f50;backdrop-filter:none}
  .portal-luma-header{min-height:78px;padding:15px 17px 12px}
  .portal-luma-brand{gap:9px}
  .portal-luma-brand>img{width:39px;height:39px;flex-basis:39px}
  .portal-luma-brand h2{font-size:20px}
  .portal-luma-brand .portal-luma-status{max-width:170px;font-size:10px}
  .portal-luma-modes{padding:0 17px 13px;gap:4px}
  .portal-luma-modes .button{min-height:44px;padding:9px;font-size:12px}
  .portal-luma-privacy{min-height:33px;padding:7px 16px;font-size:10px}
  .portal-luma-context{margin:13px 16px 0;padding:7px 7px 7px 11px}
  .portal-luma-context-copy>strong{font-size:11px}
  .portal-luma-messages{gap:22px;padding:23px 18px 18px}
  .portal-luma-welcome{margin:0;padding:0}
  .portal-luma-welcome-mark{width:43px;height:43px;margin-bottom:15px}
  .portal-luma-welcome h3{max-width:300px;font-size:24px}
  .portal-luma-welcome p{max-width:330px;margin-top:10px;font-size:13px;line-height:1.75}
  .portal-luma-suggestions{gap:8px;padding:0 0 5px}
  .portal-luma-suggestions .portal-luma-suggestion{gap:10px;min-height:68px;padding:11px 12px;border-radius:12px}
  .portal-luma-suggestion-copy>strong{font-size:12px}
  .portal-luma-suggestion-copy>span{font-size:10px}
  .portal-luma-message.user{max-width:96%;padding:12px 14px;border-radius:15px 15px 4px 15px}
  .portal-luma-text{font-size:14px;line-height:1.8}
  .portal-luma-role{font-size:10px}
  .portal-luma-composer{margin:0 15px;padding:12px 13px 11px;border-radius:14px}
  .portal-luma-composer textarea{min-height:55px;max-height:120px;font-size:14px}
  .portal-luma-composer-actions{align-items:center;gap:9px;margin-top:9px}
  .portal-luma-composer-actions .portal-luma-keyboard{max-width:140px;font-size:9px}
  .portal-luma-composer-actions .button{padding:9px 11px;font-size:11px}
  .portal-luma-clear-confirm{margin:12px 16px 0;padding:11px 12px}
  .portal-luma-error{margin:0 15px 11px;padding:11px 12px}
  .portal-luma-proposal{padding:16px;border-radius:15px}
  .portal-luma-proposal>h3{font-size:17px}
  .portal-luma-proposal-fields{gap:12px}
  .portal-luma-footnote{padding:1px 15px max(7px,env(safe-area-inset-bottom))}
  .portal-luma-info-button{min-height:44px;font-size:10px}
}
@media(max-width:360px){
  .portal-luma-header{padding-left:13px;padding-right:13px}
  .portal-luma-modes{padding-left:13px;padding-right:13px}
  .portal-luma-actions{gap:0}
  .portal-luma-actions button{padding:7px;min-width:44px}
  .portal-luma-brand .portal-luma-status{max-width:135px}
  .portal-luma-messages{padding-left:15px;padding-right:15px}
  .portal-luma-composer{margin-left:12px;margin-right:12px}
  .portal-luma-composer-actions .portal-luma-keyboard{max-width:123px}
  .portal-luma-proposal-fields{grid-template-columns:1fr}
}
@media(max-height:560px){
  .portal-luma-header{min-height:64px;padding-top:9px;padding-bottom:9px}
  .portal-luma-modes{padding-bottom:9px}
  .portal-luma-privacy{display:none}
  .portal-luma-messages{padding-top:15px;padding-bottom:13px}
  .portal-luma-welcome-mark{display:none}
  .portal-luma-composer textarea{min-height:44px;max-height:88px}
  .portal-luma-footnote{padding-bottom:max(3px,env(safe-area-inset-bottom))}
}
/* Respond to the actual drawer height when the phone keyboard is visible. */
@container luma-panel (max-height:520px){
  .portal-luma-header{min-height:58px;padding-top:7px;padding-bottom:7px}
  .portal-luma-brand>img{width:33px;height:33px;flex-basis:33px}
  .portal-luma-brand h2{font-size:18px}
  .portal-luma-brand .portal-luma-status{font-size:10px;margin-top:1px}
  .portal-luma-modes{padding-top:0;padding-bottom:8px}
  .portal-luma-privacy{display:none}
  .portal-luma-context{margin-top:8px;padding-top:2px;padding-bottom:2px}
  .portal-luma-context-copy>span{display:none}
  .portal-luma-messages{padding-top:13px;padding-bottom:13px;gap:16px}
  .portal-luma-welcome-mark{display:none}
  .portal-luma-welcome h3{font-size:21px}
  .portal-luma-composer{padding-top:10px;padding-bottom:10px}
  .portal-luma-composer textarea{min-height:44px;max-height:88px}
  .portal-luma-error{flex-shrink:1;min-height:0;max-height:112px;overflow-y:auto;overscroll-behavior:contain}
  .portal-luma-footnote{padding-top:0;padding-bottom:max(3px,env(safe-area-inset-bottom))}
}
@container luma-panel (max-height:320px){
  .portal-luma-header{min-height:44px;padding-top:0;padding-bottom:0}
  .portal-luma-brand>img{width:28px;height:28px;flex-basis:28px}
  .portal-luma-brand .portal-luma-status,.portal-luma-modes,.portal-luma-footnote{display:none}
  .portal-luma-context{min-height:46px;max-height:46px;margin-top:4px;padding:0 6px 0 10px}
  .portal-luma-context-copy>strong{display:-webkit-box;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical}
  .portal-luma-messages{padding-top:4px;padding-bottom:4px}
  .portal-luma-composer{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:8px;padding:6px 8px}
  .portal-luma-composer textarea{height:44px;min-height:44px;max-height:72px}
  .portal-luma-composer-actions{margin:0}
  .portal-luma-keyboard{display:none}
  .portal-luma-error{flex:0 0 auto;min-height:60px;max-height:68px;margin:0 12px 8px;padding:7px 10px}
}
@media(prefers-reduced-motion:reduce){.portal-luma-overlay,.portal-luma-panel{scroll-behavior:auto}}
@media print{.portal-luma-overlay,.portal-luma-panel{display:none!important}}
