/* Conversation-first layout, shared by public widget and internal preview. */
html:has(body.widget-page){height:100%;overflow:hidden}
body.widget-page{height:100dvh;padding:0;overflow:hidden;background:#fff}
.widget-page .widget-shell{width:100%;max-width:720px;height:100dvh;min-height:0;max-height:none;border:0;border-radius:0;box-shadow:none;overflow:hidden}
.widget-page .welcome-view,.widget-page .email-view{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:24px}
.widget-page .chat-view{position:relative;flex:1;min-height:0;overflow:hidden;display:flex;flex-direction:column}
.widget-page .conversation-scroll{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scroll-behavior:auto;scrollbar-gutter:stable;overflow-anchor:none;background:#fff}
.widget-page .conversation-scroll:focus-visible{outline:2px solid var(--teal);outline-offset:-2px}
.widget-page .messages{display:block;overflow:visible;flex:none;min-height:0;max-height:none;padding:16px 14px 8px;scroll-behavior:auto}
.widget-page .message{max-width:100%;margin-bottom:18px;overflow-wrap:anywhere}
.widget-page .message.user{margin-left:20px}
.widget-page .message-body{font-size:16px;line-height:1.6;padding:12px 14px}
.widget-page .message.assistant .message-body{background:#f4f7f9;border-color:#dce5ea}
.widget-page .message-author{font-size:11px;margin-bottom:5px}
.widget-page .conversation-status{margin:0 14px 10px;font-size:12px;padding:8px 10px}
.widget-page .resolution-row{padding:0 16px 10px;margin:0}
.widget-page .resolution-row .text-button{min-height:36px;font-size:12px}
.widget-page .generation-status{font-size:13px;color:var(--teal);padding:8px 16px 16px}
.widget-page .chat-error{margin:4px 14px 12px;font-size:13px;line-height:1.5}
.widget-page .frozen-draft{margin:0 14px 12px}
.widget-page .composer{flex-shrink:0;margin:8px 12px 0;padding:10px 12px;background:#f1f8f6;border:1px solid #a5c8c0;border-radius:12px;box-shadow:none;max-height:45%;overflow-y:auto}
.widget-page .composer:focus-within{border-color:var(--teal);box-shadow:0 0 0 2px #d4ede5}
.widget-page .composer.is-collapsed{padding:0;background:#f4f9f7;overflow:hidden;border-color:#bad2cb}
.composer-open{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:46px;text-align:left;padding:10px 14px;border:0;border-radius:11px;background:transparent;color:#165c52;font-size:15px}
.composer-open:hover{background:#e4f1eb}
.composer-open span:last-child{font-size:20px;font-weight:600}
.composer-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px}
.widget-page .composer .composer-label{margin:0;font-size:13px;font-weight:600}
.widget-page #composer-collapse{min-height:28px;font-size:12px;padding:2px 6px}
.widget-page .composer textarea{display:block;min-height:52px;max-height:100px;height:52px;resize:none;font-size:16px;line-height:24px;padding:8px 10px;border:1px solid #b9ccc6;background:#fff;overflow-y:auto}
.widget-page .composer-bottom{padding-top:6px;gap:8px}
.widget-page .composer-bottom>span{max-width:65%;font-size:10px;line-height:1.4}
.widget-page .send-button{height:44px;min-width:110px;padding:6px 12px;font-size:13px}
.widget-page .chat-footer{flex-shrink:0;padding:5px 16px 7px;font-size:10px;line-height:1.4}
.widget-page #public-dispatch{flex-shrink:0;width:calc(100% - 24px);margin:8px 12px 0;font-size:14px;min-height:42px}
.widget-page .latest-messages{position:absolute;right:24px;bottom:84px;z-index:2;border:1px solid #bfd6cd;border-radius:20px;background:#fff;color:#005e54;box-shadow:0 3px 15px #173b3420;padding:9px 14px;min-height:38px;font-size:13px}
.widget-page .pilot-email-wrap{margin-bottom:8px;padding-bottom:8px}
.widget-page .pilot-email-wrap label{margin:0 0 6px;font-size:12px}
.widget-page .pilot-email-wrap p{font-size:11px;line-height:1.4}
.widget-page .pilot-email-wrap input{padding:8px 10px;font-size:16px}
.widget-page dialog{max-height:calc(100dvh - 24px);overflow-y:auto}
@media(max-height:520px){
 .widget-page .composer textarea{min-height:44px;max-height:68px;height:44px}
 .widget-page .composer{margin-top:4px;max-height:48%}
 .widget-page .chat-footer{padding-top:3px;padding-bottom:3px}
}
@media(prefers-reduced-motion:reduce){.widget-page *{scroll-behavior:auto!important}}

/* Selected design: one teal panel, readable conversation and clear material cards. */
.widget-page{--ink:#153e3b;--text:#234643;--muted:#58716e;--line:#d8e3e2;--teal:#006e62;--teal-hover:#00594f;font-family:Arial,sans-serif}
.widget-page .ui-icon{display:block;width:24px;height:24px;flex:0 0 24px}
.widget-page .visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.widget-page .widget-header{display:flex;flex-shrink:0;align-items:center;min-height:88px;padding:18px 16px 12px;background:#e7f3ef;border:0}
.widget-page .widget-brand{display:flex;align-items:center;gap:12px;min-width:0}
.widget-page .widget-header h1{font-size:19px;line-height:1.3;letter-spacing:-.2px;font-weight:700;margin:0;color:#153e3b}
.brand-symbol{width:44px;height:44px;flex:0 0 44px;display:grid;place-items:center;border-radius:12px;color:white;background:#006e62}
.brand-subline{display:flex;align-items:center;gap:7px;flex-wrap:wrap;font-size:12px;line-height:1.4;margin-top:5px;color:#4b6b65}
.test-badge{border:1px solid #bcd7cc;border-radius:6px;padding:2px 6px;font-size:10px;line-height:1.3;color:#3c6558;background:#f2f9f5;white-space:nowrap}
.widget-page.public-framed .widget-header,.widget-page.pilot-embedded .widget-header{display:none}
.widget-page .chat-toolbar{position:relative;display:flex;align-items:center;gap:8px;flex-shrink:0;padding:0 16px 14px;min-height:58px;background:#e7f3ef;border:0;border-bottom:1px solid #c5dcd3;z-index:5}
.widget-page .chat-toolbar button,.widget-page .resolution-row button,.widget-page #composer-collapse{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;font-size:14px;font-weight:600;line-height:1.3;border-radius:10px}
.support-button{padding:9px 12px;border:1px solid #bdd6cc;background:#fff;color:#155b50}
.support-button:hover{background:#f4faf7;border-color:#79aa98}
.more-wrap{position:relative;margin-left:auto;flex-shrink:0}
.more-button{border:0;background:transparent;color:#315f54;padding:9px 8px}
.more-button:hover,.more-button[aria-expanded=true]{background:#d4e9e1}
.more-panel{position:absolute;right:0;top:calc(100% + 7px);width:230px;max-width:calc(100vw - 32px);background:#fff;border:1px solid #c9dcd4;border-radius:14px;padding:6px;box-shadow:0 12px 32px #173f3626}
.widget-page .more-panel button,.widget-page .more-panel a{display:flex;align-items:center;gap:10px;width:100%;min-height:46px;padding:11px 12px;background:transparent;border:0;color:#234e44;font-size:14px;font-weight:500;text-align:left;text-decoration:none;border-radius:8px;justify-content:flex-start}
.widget-page .more-panel button:hover,.widget-page .more-panel a:hover{background:#edf6f2}
.widget-page .conversation-scroll{background:#f5f8f8}
.widget-page .messages{padding:20px 16px 8px}
.widget-page .message{margin-bottom:20px}
.widget-page .message-author{font-size:12px;margin:0 0 7px 2px;color:#58716e}
.widget-page .message.assistant .message-body{background:#fff;border:1px solid #d8e3e2;padding:16px;border-radius:14px 14px 14px 4px;color:#234643}
.widget-page .message.user .message-body{background:#dceee8;border:1px solid #bdd8cd;color:#153e3b;padding:12px 16px}
.widget-page .message.message-error .message-body{background:#fff3ed;border-color:#edc4b5;color:#853520}
.widget-page .pilot-sources{margin-top:12px;border:1px solid #b5d6c9;border-radius:12px;background:#e9f4ee;overflow:hidden}
.widget-page .pilot-sources>summary{display:flex;align-items:center;gap:12px;min-height:76px;padding:12px;list-style:none;color:#155c4b;cursor:pointer}
.widget-page .pilot-sources>summary::-webkit-details-marker{display:none}
.widget-page .pilot-sources>summary:hover{background:#dceee4}
.widget-page .pilot-sources>summary:focus-visible{outline:3px solid #00796b;outline-offset:-3px}
.source-symbol{display:grid;place-items:center;background:#fff;color:#247b60;width:40px;height:40px;flex:0 0 40px;border-radius:10px;border:1px solid #d1e5da}
.source-copy{flex:1;min-width:0;display:grid;gap:5px}
.source-copy strong{font-size:15px;line-height:1.35;font-weight:700}
.source-copy>span{font-size:12px;line-height:1.45;color:#456d5b}
.source-chevron{transition:transform .15s}
.pilot-sources[open] .source-chevron{transform:rotate(180deg)}
.widget-page .pilot-sources>.suggestion{margin:0 10px 10px;padding:14px;background:#fff;border-color:#d1e2d8}
.widget-page .suggestion strong{font-size:15px;line-height:1.4}
.widget-page .suggestion-preview,.widget-page .suggestion-full p{font-size:14px;line-height:1.6}
.widget-page .suggestion-details>summary{padding-top:6px;min-height:44px}
.widget-page .suggestion-open-label,.widget-page .suggestion-close-label{font-size:13px;font-weight:600;line-height:1.5}
.widget-page .suggestion a{font-size:13px;line-height:1.6}
.widget-page .resolution-row{padding:4px 16px 18px;text-align:left}
.widget-page #resolve-button{padding:10px 14px;background:#fff;border:1px solid #cbded5;color:#276451}
.widget-page #resolve-button:hover{background:#eaf5ef;border-color:#82b39e}
.widget-page .composer{background:#eaf5f0;border-color:#9bc3b4;border-radius:12px}
.widget-page .composer.is-collapsed{background:#ecf6f1;border-color:#a4caba}
.widget-page .composer-open{min-height:52px;gap:12px;padding:12px 14px;font-size:15px;font-weight:600}
.composer-open #composer-open-label{flex:1}
.composer-open .composer-chevron{margin-left:auto}
.widget-page #composer-collapse{font-size:12px;min-width:44px;padding:4px 6px}
.widget-page .composer .composer-label{font-size:14px;font-weight:700}
.widget-page .send-button{font-size:14px}
.widget-page .send-button svg{width:24px;height:24px}
.widget-page .chat-footer{padding:6px 16px 8px;font-size:11px;color:#58716e}
.widget-page .latest-messages{min-height:44px;font-size:14px}
.widget-page .welcome-view,.widget-page .email-view{background:#f5f8f8}
.widget-page .welcome-illustration{margin-top:4px}
.widget-page .mode-option{background:#fff}
.widget-page .about-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}
.widget-page .control-button{display:grid;place-items:center;min-width:44px;height:44px;border:0;border-radius:10px;background:#eaf5f0;color:#255b4d}
.about-facts{margin:16px 0 0;padding:14px;background:#f1f7f4;border-radius:12px;display:grid;gap:12px}
.about-facts dt{font-size:12px;color:#58716e;margin-bottom:3px}
.about-facts dd{font-size:14px;margin:0;line-height:1.5;overflow-wrap:anywhere}
.widget-page dialog p{font-size:14px}
.widget-page .dialog-actions button{font-size:13px;min-height:44px}
.widget-page button:focus-visible,.widget-page a:focus-visible{outline:3px solid #00796b;outline-offset:2px}
@media(max-width:380px){.widget-page .chat-toolbar{padding-left:12px;padding-right:12px;gap:4px}.widget-page .support-button{font-size:12px;gap:6px;padding:8px}.widget-page .more-button{padding:8px 4px;font-size:12px}.widget-page .messages{padding-left:12px;padding-right:12px}.source-copy strong{font-size:14px}.widget-page .pilot-sources>summary{gap:9px;padding:10px}}
@media(max-height:520px){.widget-page .widget-header{min-height:68px;padding:10px 16px}.widget-page .chat-toolbar{min-height:52px;padding-bottom:8px}.widget-page .composer-heading{margin-bottom:0}.widget-page #composer-collapse{min-height:36px}.widget-page .messages{padding-top:14px}}

/* One receipt-driven card: current state, next action and where the answer arrives. */
.widget-page .support-status{margin:0 16px 20px;padding:20px;border:1px solid #accfc0;border-top:4px solid #00796b;border-radius:14px;background:#fff;overflow-wrap:anywhere}
.widget-page .support-status-kicker{font-size:10px;font-weight:700;letter-spacing:.7px;color:#456b60;margin:0 0 10px}
.widget-page .support-status h2{font-size:21px;line-height:1.25;color:#153e3b;margin:0 0 12px;letter-spacing:-.3px}
.widget-page #support-status-copy{font-size:15px;line-height:1.55;white-space:pre-line;margin:0}
.widget-page .support-status[data-tone=success]{border-color:#a8cbb8;border-top-color:#27804e;background:#eff8f2}
.widget-page .support-status[data-tone=warning]{border-color:#dec793;border-top-color:#9b681d;background:#fffaf0}
.widget-page .support-status[data-tone=progress]{border-top-color:#477da8;background:#f2f7fb}
.widget-page .support-status #public-dispatch{margin:18px 0 0;width:100%;min-height:48px;font-size:15px}
.widget-page #support-refresh{margin-top:16px;min-height:44px;font-size:14px;background:#fff}
.widget-page .support-send-note{font-size:12px;line-height:1.45;margin:8px 0;color:#315e51;overflow-wrap:anywhere}
.widget-page .support-composer .composer-bottom>span{display:none}
.widget-page .support-composer .send-button{width:100%;min-height:44px}
.widget-page .support-status h2:focus-visible{outline:2px solid #00796b;outline-offset:4px}
.widget-page .support-toolbar-label{font-size:13px;line-height:1.4;font-weight:600;color:#315f54}
@media(max-width:380px){.widget-page .support-status{margin:0 12px 16px;padding:16px}.widget-page .support-status h2{font-size:19px}.widget-page #support-status-copy{font-size:14px}}

/* Contact details belong to the support route, apart from the AI dialogue. */
.widget-page .support-details-dialog{width:calc(100% - 24px);max-width:480px;max-height:calc(100dvh - 24px);padding:24px;border:1px solid #b4cfc5;border-radius:18px;overflow:auto;overscroll-behavior:contain;color:#183e3b;background:#fff}
.support-details-dialog::backdrop{background:rgb(20 52 49 / 45%)}
.widget-page .support-details-kicker{color:#337463;font-size:10px;letter-spacing:.8px;font-weight:700;margin:0 0 12px}
.widget-page .support-details-dialog h2{font-size:23px;line-height:1.25;margin:0 0 12px}
.widget-page .support-details-dialog p{line-height:1.5}
.widget-page #support-details-form label{display:block;font-size:14px;font-weight:600;margin:16px 0 6px}
.widget-page #support-details-form input,.widget-page #support-details-form select{box-sizing:border-box;width:100%;min-height:46px;padding:10px 12px;border:1px solid #a6c4b9;border-radius:10px;background:#fff;color:#173e38;font:inherit;font-size:16px}
.widget-page #support-details-form input:focus,.widget-page #support-details-form select:focus{outline:2px solid #00796b;outline-offset:1px}
.widget-page #support-details-form .field-hint,.widget-page .support-details-note{font-size:12px;color:#526e64;margin:7px 0 0}
.widget-page .support-contact{padding:12px 14px;border-radius:10px;background:#edf6f0;overflow-wrap:anywhere;margin:18px 0}
.widget-page #support-details-submit,.widget-page #support-details-cancel{width:100%;min-height:48px;font-size:15px;justify-content:center;margin:0 0 10px}
.widget-page #edit-support-details{display:block;font-size:13px;min-height:44px;margin:8px 0 0}
.widget-page .native-support-link{display:block;margin-top:12px;padding:12px;text-align:center}
@media(max-width:380px){.widget-page .support-details-dialog{padding:18px}.widget-page .support-details-dialog h2{font-size:21px}}

/* CJM: persistent choices, compact forms, one scrollable conversation. */
.widget-page .chat-toolbar{min-height:44px;padding:0 12px 4px;gap:6px}
.widget-page .chat-toolbar #home-button{padding:8px;color:#315f54}
.widget-page .chat-toolbar .support-toolbar-label{font-size:12px}
.widget-page .resolution-row{display:grid;grid-template-columns:1.25fr 1fr;gap:8px;flex-shrink:0;padding:8px 12px 0;background:#fff}
.widget-page .resolution-row button{padding:8px;min-height:44px;font-size:13px;gap:6px}
.widget-page .resolution-row .ui-icon{width:20px;height:20px;flex-basis:20px}
.widget-page .support-suggested{background:#006e62;color:#fff;border-color:#006e62}
.widget-page .support-suggested:hover{background:#00594f;color:#fff}
.widget-page .third-attempt-note{flex-shrink:0;margin:0;padding:8px 14px 0;font-size:12px;color:#526e64;line-height:1.4}
.widget-page .welcome-view,.widget-page .email-view{padding:16px 20px}
.widget-page .welcome-illustration{display:none}
.widget-page .welcome-view h2,.widget-page .email-view h2{font-size:24px;margin:8px 0 12px}
.widget-page .welcome-copy{font-size:14px;line-height:1.55}
.widget-page .mode-options{gap:10px;margin:16px 0}
.widget-page .mode-option{min-height:72px;padding:12px 14px}
.widget-page #continue-button{min-height:44px;margin:6px 0}
.widget-page .welcome-footnote{font-size:12px;line-height:1.5}
.widget-page .support-details-dialog{padding:16px;max-width:440px}
.widget-page .support-details-kicker{margin:0 0 6px;font-size:9px}
.widget-page .support-details-dialog h2{font-size:20px;margin:0 0 6px}
.widget-page #support-details-intro{font-size:12px;margin:0 0 10px}
.widget-page #support-details-form label{font-size:12px;margin:9px 0 4px}
.widget-page #support-details-form input,.widget-page #support-details-form select{min-height:42px;padding:8px 10px}
.widget-page #support-details-form .field-hint{font-size:11px;margin:4px 0 0}
.widget-page .support-contact{font-size:12px;padding:8px 10px;margin:10px 0}
.widget-page #support-details-submit,.widget-page #support-details-cancel{min-height:42px;margin-bottom:6px;font-size:14px}
.widget-page .support-details-note{font-size:10px;margin:3px 0 0}
.widget-page #resume-assistant{min-height:44px;font-size:13px;margin-top:10px}
.widget-page .support-details-actions{display:grid;grid-template-columns:1.15fr 1fr;gap:8px}
.widget-page .support-details-actions #support-details-submit,.widget-page .support-details-actions #support-details-cancel{font-size:12px;padding:8px;min-height:44px}
@media(max-width:360px){.widget-page .resolution-row{gap:5px;padding-left:8px;padding-right:8px}.widget-page .resolution-row button{font-size:12px;gap:4px}.widget-page .resolution-row .ui-icon{display:none}}

/* Keep the source article readable and available without opening disclosures. */
.widget-page .answer-sources{font-size:14px;gap:4px;padding:4px 2px 0}
.widget-page .answer-sources a{min-height:44px;align-items:center;text-decoration:underline;text-underline-offset:3px;line-height:1.45}
