#tpa-root{font:15px/1.5 system-ui,-apple-system,Segoe UI,sans-serif;color:#153749}
#tpa-root *{box-sizing:border-box}
#tpa-root button,#tpa-root textarea,#tpa-root select{font:inherit}
#tpa-root button{cursor:pointer;min-height:44px;border:0;border-radius:10px;font-weight:650}
#tpa-root button:focus-visible,#tpa-root a:focus-visible,#tpa-root textarea:focus-visible,#tpa-root select:focus-visible,#tpa-root input:focus-visible{outline:3px solid #dba246;outline-offset:3px}
#tpa-launch{position:fixed;right:22px;bottom:96px;background:#153749;color:white;padding:12px 20px;box-shadow:0 4px 24px #15374930;z-index:9000}
#tpa-dialog{position:fixed;inset:auto 20px 22px auto;margin:0;width:430px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 30px);padding:0;border:1px solid #d8e2e4;border-radius:18px;color:#153749;background:white;box-shadow:0 20px 70px #0003;overflow:hidden}
#tpa-dialog[open]{display:flex;flex-direction:column}
#tpa-dialog::backdrop{background:#08192340}
#tpa-root .tpa-head{display:flex;align-items:center;justify-content:space-between;background:#153749;color:white;padding:17px 20px}
#tpa-root .tpa-head strong{font-size:18px}#tpa-root .tpa-head small{display:block;color:#d5e4e9;font-size:12px;margin-top:4px}
#tpa-close{background:transparent;color:white;font-size:28px!important;min-width:44px}
#tpa-root .tpa-tools{display:flex;align-items:center;gap:12px;padding:8px 16px;border-bottom:1px solid #e4e9e9;font-size:12px}
#tpa-root .tpa-tools label{margin-left:auto}#tpa-root select{max-width:120px;padding:8px;border:1px solid #ccd7db;background:white;color:#153749;border-radius:6px}
#tpa-reset{background:transparent;color:#526571}
#tpa-messages{height:270px;min-height:100px;overflow-y:auto;padding:16px;background:#f6f8f7;overscroll-behavior:contain}
#tpa-root .tpa-message{max-width:95%;padding:12px 14px;margin:0 0 14px;border:1px solid #dde7e4;border-radius:12px;background:white;overflow-wrap:anywhere}
#tpa-root .tpa-message p{margin:0;white-space:pre-wrap}#tpa-root .tpa-message small{display:block;margin-top:10px;font-size:12px;color:#526571}
#tpa-root .tpa-user{margin-left:auto;background:#153749;color:white;border-color:#153749}
#tpa-root .tpa-system{background:#fff5e3;border-color:#f0d6ab}
#tpa-root .tpa-message ul{padding-left:18px;margin:6px 0 0;font-size:13px}#tpa-root a{color:#08684f;text-decoration:underline;text-underline-offset:2px}
#tpa-chat-form{padding:12px 16px 0;margin:0;background:white}
#tpa-consent-label{display:flex;gap:8px;font-size:11px;line-height:1.45;color:#4f626c}
#tpa-consent{margin:3px 0 0;flex-shrink:0;width:16px;height:16px}
#tpa-privacy{display:inline-block;font-size:11px;margin:5px 0 8px 24px}
#tpa-root .tpa-compose{display:flex;align-items:stretch;gap:8px}
#tpa-question{resize:none;flex:1;min-width:0;padding:10px;border:1px solid #bcccd2;border-radius:10px;background:white;color:#153749;font-size:16px}
#tpa-send{background:#12694f;color:white;padding:10px 13px}#tpa-send:disabled{opacity:.5;cursor:wait}
#tpa-status{margin:6px 0;min-height:18px;font-size:12px;color:#526571}
#tpa-root .tpa-bottom{border-top:1px solid #e4e9e9;padding:10px 16px 13px}
#tpa-callback{width:100%;background:#e8f1eb;color:#105339}
#tpa-root .tpa-bottom p{font-size:11px;color:#526571;margin:7px 0 0}
#tpa-projects{display:flex;flex-wrap:wrap;gap:6px;padding:8px 16px 0}
#tpa-projects[hidden],#tpa-project-summary[hidden]{display:none}
#tpa-root #tpa-projects button{font-size:12px;background:#edf3f0;color:#153749;padding:7px 10px;min-height:36px}
#tpa-project-summary{font-size:12px;margin-bottom:10px}
#tpa-project-summary summary{cursor:pointer;padding:6px 0}
#tpa-summary{width:100%;padding:8px;border:1px solid #bcccd2;border-radius:8px;font-size:13px!important}
#tpa-copy-summary{background:#edf3f0;color:#153749;padding:6px 10px;margin-top:5px}
#tpa-root .tpa-sr{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:520px){#tpa-dialog{right:12px;bottom:12px;width:calc(100vw - 24px)}#tpa-launch{right:14px;bottom:96px;padding:10px 14px}#tpa-messages{height:30dvh}#tpa-root .tpa-head{padding:12px 16px}}
@media(max-height:630px){#tpa-messages{height:20dvh}#tpa-dialog{overflow:auto}#tpa-consent-label{font-size:10px}}
@media(prefers-reduced-motion:reduce){#tpa-root *{scroll-behavior:auto!important}}

#tpa-dialog{overflow-y:auto}#tpa-dialog> *{flex-shrink:0}#tpa-messages{flex-shrink:1;min-height:140px}#tpa-question{height:64px;min-height:64px}#tpa-summary{height:90px;min-height:90px}#tpa-root .tpa-head{min-height:74px}#tpa-allowance{margin:8px 16px;font-size:12px}

#tpa-root #tpa-question{height:64px!important;min-height:64px!important}#tpa-root #tpa-summary{height:90px!important;min-height:90px!important}@media(max-width:520px){#tpa-dialog{left:12px;right:12px;width:auto;max-width:none}}

#tpa-root .tpa-head{background:linear-gradient(135deg,#153749,#17674f)}#tpa-root .tpa-message{border-radius:16px 16px 16px 4px}#tpa-root .tpa-user{border-radius:16px 16px 4px 16px}#tpa-root #tpa-projects button{min-height:44px}#tpa-callback{border:1px solid #a7cbb7!important}#tpa-allowance{color:#536970}

/* Optional guided discovery, no additional AI call until explicit submission. */
#tpa-guide[hidden],#tpa-followups[hidden]{display:none!important}
#tpa-guide,#tpa-followups{padding:12px 16px;background:#f3f8f5;border-block:1px solid #dbe7df;font-size:13px}
#tpa-guide fieldset{border:0;padding:0;margin:0;min-width:0}
#tpa-guide-title{font-weight:750;font-size:16px;padding:0;margin-bottom:5px}
#tpa-guide-progress,#tpa-guide-hint,#tpa-followup-title{margin:0 0 8px}
#tpa-guide-progress{color:#536970;font-size:11px}
#tpa-guide-options{display:grid;grid-template-columns:1fr 1fr;gap:6px;margin-bottom:10px}
#tpa-root .tpa-choice{display:flex;align-items:center;gap:7px;border:1px solid #bccfc4;border-radius:9px;min-height:44px;padding:8px;background:white;cursor:pointer;overflow-wrap:anywhere}
#tpa-root .tpa-choice:has(input:checked){background:#dcefe3;border-color:#12694f}
#tpa-root .tpa-choice input{width:17px;height:17px;margin:0;flex-shrink:0;accent-color:#12694f}
#tpa-guide-free{display:block;width:100%;border:1px solid #bcccd2;border-radius:8px;padding:9px;font-size:16px;margin:5px 0;color:#153749;background:white}
#tpa-guide small,#tpa-followups small{display:block;font-size:11px;color:#536970;margin-top:7px}
#tpa-guide-error{color:#8c330e;margin:6px 0}
#tpa-root .tpa-guide-nav{display:flex;flex-wrap:wrap;gap:7px}
#tpa-guide button,#tpa-followups button{background:#e1ebe5;color:#153749;padding:7px 10px;font-size:12px}
#tpa-guide #tpa-guide-next{background:#12694f;color:white;flex:1}
#tpa-guide button:disabled{opacity:.5;cursor:default}
#tpa-guide #tpa-guide-close{background:transparent;text-decoration:underline}
#tpa-followup-options{display:flex;flex-wrap:wrap;gap:6px}
#tpa-root #tpa-question{height:80px!important;min-height:80px!important}
@media(max-width:360px){#tpa-guide-options{grid-template-columns:1fr}}

/* Keep the title, close control and voluntary callback visible on short screens. */
#tpa-root #tpa-dialog{overflow:hidden}
#tpa-root #tpa-body{overflow-y:auto;min-height:0;flex:1 1 auto;overscroll-behavior:contain}
#tpa-root .tpa-bottom{background:white;flex:0 0 auto}
#tpa-root #tpa-dialog:has(#tpa-guide:not([hidden])) #tpa-messages,
#tpa-root #tpa-dialog:has(#tpa-guide:not([hidden])) #tpa-chat-form{display:none}
#tpa-root .tpa-bottom>a{font-size:12px}

/* Consent and review belong to the existing native callback form. */
.tpa-context-review{min-width:0;border:1px solid #abcdb9;background:#f3f8f5;border-radius:12px;padding:14px;margin:8px 0;font:14px/1.5 system-ui;color:#153749}
.tpa-context-review legend{font-size:16px;font-weight:700;padding:0 5px}
.tpa-context-review textarea{display:block;width:100%;box-sizing:border-box;min-height:90px;padding:9px;border:1px solid #bcccd2;border-radius:8px;background:white;color:#153749;font:14px/1.45 system-ui;resize:vertical}
.tpa-context-review label{display:block;margin:8px 0;font-size:13px}
.tpa-context-review .tpa-context-consent{display:flex;gap:8px;align-items:flex-start;font-size:13px;font-weight:600}
.tpa-context-review input[type=checkbox]{flex:0 0 auto;width:19px;height:19px;margin:3px 0;accent-color:#12694f}
.tpa-context-review p{font-size:12px;margin:8px 0}.tpa-context-review details summary{cursor:pointer;padding:7px 0}
.tpa-context-review :focus-visible{outline:3px solid #dba246;outline-offset:3px}
