:root{color-scheme:light;--bg:#f5f5ef;--surface:#fff;--ink:#193630;--muted:#5f7068;--line:#d9dfd5;--accent:#164c40;--accent-light:#eaf3e6;--input:#fff;--shadow:0 6px 24px #19363008;font-family:system-ui,-apple-system,"Segoe UI","Microsoft JhengHei",sans-serif;font-size:14px}
@media(prefers-color-scheme:dark){:root:not([data-theme="light"]){color-scheme:dark;--bg:#101c19;--surface:#1a362e;--ink:#e6efe7;--muted:#afc1b5;--line:#34483e;--accent:#9bd4b3;--accent-light:#244438;--input:#132820;--shadow:none}}
:root[data-theme="dark"]{color-scheme:dark;--bg:#101c19;--surface:#1a362e;--ink:#e6efe7;--muted:#afc1b5;--line:#34483e;--accent:#9bd4b3;--accent-light:#244438;--input:#132820;--shadow:none}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink)}[hidden]{display:none!important}button,input,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:wait;opacity:.55}button:focus-visible,input:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #479774;outline-offset:3px}button{border:0}p{line-height:1.65}h1,h2,p{margin:0}h2{font-size:19px;line-height:1.5;letter-spacing:.01em}.app{height:100dvh;height:var(--viewport-height,100dvh);display:flex;flex-direction:column;overflow:hidden}.header{display:flex;align-items:center;gap:11px;padding:19px 20px 17px;background:var(--surface);border-bottom:1px solid var(--line);flex-shrink:0}.brand-icon{width:39px;height:39px;display:grid;place-items:center;background:linear-gradient(135deg,#164c40,#267453);color:#fff;border-radius:13px;font-weight:750;font-size:21px}.brand{flex:1}.brand h1{font-size:16px;letter-spacing:.04em}.brand p{color:var(--muted);font-size:11px;margin-top:4px;display:flex;align-items:center;gap:5px}.dot{width:6px;height:6px;border-radius:50%;background:#26a28c}.icon-button{border-radius:10px;background:var(--bg);color:var(--ink);width:36px;height:36px;font-size:25px}.tabs{display:flex;gap:5px;padding:10px 16px;background:var(--surface);flex-shrink:0}.tab{flex:1;padding:10px 6px;border-radius:9px;background:transparent;color:var(--muted);font-size:12px;font-weight:650}.tab.active{background:var(--accent-light);color:var(--accent)}.status{font-size:12px;color:var(--muted);padding:0 20px 9px;background:var(--surface);min-height:26px;flex-shrink:0}.status.error{color:#b54235}:root[data-theme="dark"] .status.error{color:#ffaaa2}.chat-view{display:flex;flex:1;flex-direction:column;min-height:0}.messages{flex:1;overflow-y:auto;padding:20px 18px 14px;overscroll-behavior:contain;scrollbar-width:thin}.message{display:flex;flex-direction:column;align-items:flex-start;margin-bottom:16px}.message.user{align-items:flex-end}.message-label{font-size:10px;letter-spacing:.06em;color:var(--muted);margin:0 5px 5px}.bubble{max-width:92%;padding:12px 14px;border-radius:3px 14px 14px;background:var(--surface);box-shadow:var(--shadow);border:1px solid var(--line);white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.75;font-size:13px}.user .bubble{border-radius:14px 3px 14px 14px;background:var(--accent-light);border-color:transparent}.starter{padding:8px 22px 16px;color:var(--muted);font-size:12px}.text-button{background:transparent;color:var(--accent);font-size:12px;padding:9px 0;text-align:left}.composer{margin:0 15px 12px;padding:10px 12px 9px;border:1px solid var(--line);border-radius:14px;background:var(--input);box-shadow:var(--shadow);flex-shrink:0}.composer textarea{border:0;padding:3px 2px;width:100%;background:transparent;color:var(--ink);resize:none;min-height:48px;max-height:110px;line-height:1.6}.composer textarea:focus-visible{outline-offset:0}.composer-bottom{display:flex;align-items:center;justify-content:space-between}.composer-bottom>span{color:var(--muted);font-size:10px}.primary,.secondary{border-radius:9px;min-height:39px;padding:9px 13px;font-size:12px;font-weight:650}.primary{background:var(--accent);color:var(--surface)}.secondary{background:var(--surface);color:var(--ink);border:1px solid var(--line)}.primary:hover:not(:disabled){filter:brightness(1.1)}.form-view{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:22px 20px;scrollbar-width:thin}.section-heading{margin-bottom:20px}.eyebrow{display:block;font-size:10px;letter-spacing:.12em;color:var(--accent);font-weight:700;margin-bottom:7px}.section-heading p{color:var(--muted);font-size:12px;margin-top:9px}fieldset{border:0;padding:0;margin:0;min-width:0}label{display:block;font-size:12px;font-weight:600;margin:15px 0 7px}.required,.optional{font-size:10px;font-weight:400;color:var(--muted);margin-left:4px}input:not([type="radio"]),.form-view textarea{width:100%;border:1px solid var(--line);border-radius:9px;background:var(--input);color:var(--ink);padding:10px 11px;line-height:1.5}.form-view textarea{resize:vertical;min-height:65px}.contact-grid{display:grid;grid-template-columns:minmax(0,1fr) 90px;gap:10px}.field-note{font-size:11px;color:var(--muted);margin-top:6px}.form-actions{display:flex;justify-content:space-between;gap:8px;margin-top:20px}.preview{border:1px solid var(--line);background:var(--surface);padding:18px 15px;border-radius:14px;margin-top:24px}.preview h2{font-size:16px}.preview dl{margin:15px 0}.preview dt{font-size:11px;color:var(--muted);margin-top:12px}.preview dd{margin:5px 0 0;font-size:13px;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere}.notice{font-size:12px;color:var(--muted);line-height:1.75}.result-view{flex:1;min-height:0;overflow-y:auto;padding:34px 24px}.result-view h2{margin:6px 0 15px}.result-view p{margin-bottom:15px;font-size:13px;overflow-wrap:anywhere}.result-icon{display:grid;place-items:center;width:52px;height:52px;border-radius:18px;background:var(--accent-light);color:var(--accent);font-size:27px;margin-bottom:25px}.result-view .secondary{margin-top:8px}.footer{padding:10px 20px max(12px,env(safe-area-inset-bottom));background:var(--surface);border-top:1px solid var(--line);flex-shrink:0;font-size:10px;color:var(--muted);max-height:28%;overflow-y:auto}.footer summary{cursor:pointer;line-height:1.5}.footer p{margin-top:9px;font-size:11px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:480px){.contact-grid{grid-template-columns:1fr}input:not([type="radio"]),textarea,.composer textarea{font-size:16px}.header{padding:16px 18px}.messages{padding:18px 17px}.form-view{padding:20px 18px}.bubble{font-size:14px}.composer{margin-bottom:10px}.app{min-height:220px}}
@media(prefers-reduced-motion:no-preference){button{transition:background-color .12s,filter .12s}}

/* A direct visit fills its available viewport; the widget sizes its own iframe. */
.home-link{display:grid;place-items:center;min-height:36px;padding:0 9px;border:1px solid var(--line);border-radius:10px;color:var(--ink);background:var(--bg);font-size:11px;text-decoration:none;white-space:nowrap}
.home-link:focus-visible{outline:3px solid #479774;outline-offset:3px}
.standalone body{height:var(--viewport-height,100dvh);overflow:hidden}
.standalone .app{width:100%;height:var(--viewport-height,100dvh);min-height:0;padding-top:env(safe-area-inset-top);padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}
.standalone.compact-viewport .starter{display:none}



/* AI consultation tools remain inside the existing responsive layout. */
.quick-topics{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px}
.quick-topics button{padding:7px 10px;border:1px solid var(--line);border-radius:18px;background:var(--surface);color:var(--ink);font-size:12px}
.quick-topics button:hover{background:var(--accent-light)}
.consultation-support{font-size:12px;color:var(--muted);overflow-wrap:anywhere}
.resource-label{font-size:11px;font-weight:650;margin:4px 0}
.resource-links{margin:5px 0 15px;padding-left:20px;line-height:1.8}
.resource-links a{color:var(--accent);text-underline-offset:3px}
.resource-links a:focus-visible{outline:3px solid #479774;outline-offset:3px}
.handoff-card{padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--accent-light);margin:8px 0 12px}
.handoff-card .secondary{margin-top:9px}
@media(prefers-color-scheme:dark){:root:not([data-theme="light"]) .status.error{color:#ffaaa2}}
