#edai-root{position:fixed;right:20px;bottom:20px;z-index:2147483000;font:14px/1.45 system-ui,-apple-system,Segoe UI,sans-serif;color:#f5f7f6}#edai-root *{box-sizing:border-box}#edai-root button,#edai-root input,#edai-root textarea{font:inherit}#edai-launch{width:56px;height:56px;border-radius:50%;border:1px solid #5bdeaa;background:#0c9f6d;color:#fff;font-size:25px;cursor:pointer;box-shadow:0 5px 22px #0007}#edai-panel{position:absolute;right:0;bottom:70px;width:min(370px,calc(100vw - 30px));height:min(540px,calc(100dvh - 105px));background:#111917;border:1px solid #36584c;border-radius:15px;display:flex;flex-direction:column;box-shadow:0 15px 60px #0009;overflow:hidden}#edai-panel[hidden]{display:none}#edai-head{padding:15px 16px;background:#0c3226;display:flex;justify-content:space-between;align-items:center}#edai-head strong{font-size:16px}#edai-close{background:transparent;border:0;color:white;cursor:pointer;font-size:24px}#edai-log{flex:1;overflow:auto;padding:16px;display:flex;flex-direction:column;gap:12px}#edai-log .edai-msg{padding:10px 12px;border-radius:12px;max-width:92%;white-space:pre-wrap;overflow-wrap:anywhere;background:#26312e}#edai-log .edai-user{align-self:flex-end;background:#086d4d}#edai-actions{padding:0 12px 9px;display:flex;gap:6px;flex-wrap:wrap}#edai-actions button{background:#193b30;border:1px solid #31775a;color:#e6fff4;border-radius:16px;padding:7px 10px;cursor:pointer}#edai-form{display:flex;gap:8px;padding:12px;border-top:1px solid #355044}#edai-input{flex:1;min-width:0;border-radius:9px;padding:10px;background:#1c2823;color:white;border:1px solid #476153}#edai-send,#edai-lead-submit{background:#13b981;color:#06150f;border:0;border-radius:9px;padding:10px 13px;font-weight:700;cursor:pointer}#edai-lead{padding:14px;overflow:auto}#edai-lead[hidden],#edai-chat[hidden]{display:none}#edai-chat{display:flex;flex-direction:column;flex:1;min-height:0}#edai-lead input:not([type=checkbox]),#edai-lead textarea{display:block;width:100%;padding:10px;margin:8px 0;background:#1c2823;color:white;border:1px solid #476153;border-radius:8px}#edai-lead textarea{min-height:90px;resize:vertical}#edai-lead label{display:flex;align-items:start;gap:8px;margin:12px 0}#edai-lead a{color:#74e6ba}#edai-status{font-size:12px;color:#bce8d5;padding:0 12px 8px}#edai-root button:focus-visible,#edai-root input:focus-visible,#edai-root textarea:focus-visible{outline:2px solid #a7ffd7;outline-offset:2px}@media(max-width:600px){#edai-root{right:12px;bottom:12px}#edai-panel{width:calc(100vw - 24px);height:min(560px,calc(100dvh - 90px))}}@media(prefers-reduced-motion:reduce){#edai-root *{animation:none!important;transition:none!important}}

/* Phase 4A: accessible, clickable links in advisor replies */
#edai-log .edai-msg a{color:#83efd0;text-decoration:underline;text-underline-offset:2px;overflow-wrap:anywhere;word-break:break-word}
#edai-log .edai-msg a:hover{color:#c7ffeb}
#edai-log .edai-msg a:focus-visible{outline:2px solid #a7ffd7;outline-offset:2px}

/* Phase 4B: taller conversation, persistent composer, Hi3D advisor identity */
#edai-panel{width:min(390px,calc(100vw - 24px));height:min(660px,calc(100dvh - 95px));}
#edai-head{min-height:76px;flex-shrink:0;padding:12px 16px;gap:10px}
#edai-head .edai-brand{display:flex;align-items:center;gap:12px;min-width:0}
#edai-head .edai-brand strong{font-size:15px;line-height:1.25}
.edai-head-avatar,.edai-msg-avatar{display:block;object-fit:cover;object-position:center;border-radius:50%;flex-shrink:0;background:#1b2423;border:1px solid #247b57}
.edai-head-avatar{width:42px;height:42px;border:2px solid #13b981}
#edai-chat{min-height:0;overflow:hidden}
#edai-log{min-height:0;flex:1;overflow-y:auto;overscroll-behavior:contain;gap:14px;padding:16px 12px 18px}
#edai-log .edai-assistant-row{display:flex;align-items:flex-start;gap:9px;max-width:100%;flex-shrink:0}
#edai-log .edai-msg-avatar{width:34px;height:34px;margin-top:3px}
#edai-log .edai-msg{flex-shrink:0;max-width:88%;line-height:1.55}
#edai-log .edai-assistant-row .edai-msg{flex:1;max-width:calc(100% - 43px)}
#edai-log .edai-user{max-width:85%;margin-left:auto}
#edai-shortcuts{flex-shrink:0;border-top:1px solid #29483c;background:#111917}
#edai-shortcuts summary{list-style:none;cursor:pointer;padding:9px 14px;color:#b9f5dc;font-size:12px;font-weight:600;user-select:none;display:flex;align-items:center;justify-content:space-between}
#edai-shortcuts summary::-webkit-details-marker{display:none}
#edai-shortcuts summary::after{content:'+';font-size:17px;line-height:1}
#edai-shortcuts[open] summary::after{content:'−'}
#edai-actions{padding:2px 12px 12px;gap:7px}
#edai-actions button{font-size:12px;padding:7px 10px}
#edai-form{flex-shrink:0;padding:11px 12px 12px;background:#111917}
#edai-status{flex-shrink:0}
#edai-lead{flex:1;min-height:0;overflow-y:auto}
#edai-back{background:#193b30;color:#e6fff4;border:1px solid #31775a;border-radius:9px;padding:10px 13px;cursor:pointer;margin-left:8px}
@media(max-width:600px){#edai-panel{width:calc(100vw - 24px);height:min(660px,calc(100dvh - 85px))}#edai-head{min-height:70px}#edai-log{padding:14px 10px}#edai-log .edai-msg-avatar{width:30px;height:30px}#edai-log .edai-assistant-row .edai-msg{max-width:calc(100% - 39px)}}

/* v1.3.3: multiline composer; sending requires a button click. */
#edai-input{resize:none;overflow-y:auto;max-height:132px;min-height:42px;line-height:1.45;font:inherit;box-sizing:border-box;align-self:center;}
#edai-form{align-items:flex-end;}
#edai-send{align-self:flex-end;min-height:42px;}


/* v1.3.4: branded chat launcher, two overlapping speech bubbles. */
#edai-launch{position:relative;display:grid;place-items:center;width:62px;height:62px;padding:0;overflow:visible;border-radius:50%;border:1.5px solid #63e8af;background:linear-gradient(145deg,#103c31 0%,#087652 58%,#0cc38a 100%);box-shadow:0 0 0 3px #08291d,0 9px 25px #0009,inset 0 1px 1px #b5ffe25e;transition:transform .18s ease,box-shadow .18s ease,filter .18s ease;isolation:isolate}
#edai-launch .edai-launch-icon{width:37px;height:37px;display:block;position:relative;z-index:1;overflow:visible;filter:drop-shadow(0 2px 2px #001a13aa)}
#edai-launch .edai-bubble-back{fill:#09251e;stroke:#b1fbe0;stroke-width:2.2;stroke-linejoin:round}
#edai-launch .edai-bubble-front{fill:#e3fff3;stroke:#104c38;stroke-width:2.4;stroke-linejoin:round}
#edai-launch .edai-bubble-line{fill:none;stroke:#096d4f;stroke-width:3.3;stroke-linecap:round}
#edai-launch .edai-bubble-dot{fill:#12b981}
#edai-launch .edai-launch-glow{position:absolute;inset:5px;border-radius:50%;border:1px solid #ffffff24;pointer-events:none}
#edai-launch:hover{transform:translateY(-2px) scale(1.035);filter:brightness(1.08);box-shadow:0 0 0 3px #08291d,0 12px 30px #000a,0 0 14px #12b98155}
#edai-launch:active{transform:scale(.96)}
#edai-launch[aria-expanded="true"]{background:linear-gradient(145deg,#0c3226,#0b7c56)}
@media(max-width:600px){#edai-launch{width:58px;height:58px}#edai-launch .edai-launch-icon{width:35px;height:35px}}
@media(prefers-reduced-motion:reduce){#edai-launch{transition:none}}

/* Inquiry guidance is separate from submitted project content. */
#edai-root .edai-project-hint{margin:2px 0 7px;font-size:12px;line-height:1.45;opacity:.85}

/* v1.3.10: non-destructive chat retry */
#edai-recovery:not([hidden]){display:flex;justify-content:flex-start;padding:0 12px 10px;background:#111917}
#edai-retry{background:#193b30;color:#e6fff4;border:1px solid #31775a;border-radius:8px;padding:8px 12px;cursor:pointer;font:inherit;font-size:12px}
#edai-retry:focus-visible{outline:2px solid #65e5b4;outline-offset:2px}
#edai-retry:disabled{opacity:.6;cursor:wait}



/* v1.3.12 — clean, high-contrast consent control; one SVG tick only */
#edai-root #edai-lead input[type="checkbox"][name="consent"] {
  -webkit-appearance: none !important;
  appearance: none !important;
  display: inline-block !important;
  position: relative;
  box-sizing: border-box;
  flex: 0 0 22px;
  width: 22px !important;
  height: 22px !important;
  min-width: 22px;
  min-height: 22px;
  margin: 0 !important;
  padding: 0 !important;
  border: 2px solid #d0e1d9 !important;
  border-radius: 5px !important;
  background: #17241f !important;
  box-shadow: none !important;
  cursor: pointer;
  vertical-align: top;
}
#edai-root #edai-lead input[type="checkbox"][name="consent"]::before,
#edai-root #edai-lead input[type="checkbox"][name="consent"]::after {
  content: none !important;
  display: none !important;
}
#edai-root #edai-lead input[type="checkbox"][name="consent"]:checked {
  border-color: #13b981 !important;
  background-color: #13b981 !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7' fill='none' stroke='%2306241b' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-position: center !important;
  background-size: 17px 17px !important;
  background-repeat: no-repeat !important;
}
#edai-root #edai-lead input[type="checkbox"][name="consent"]:focus-visible {
  outline: 3px solid #e6fff4 !important;
  outline-offset: 3px;
}
#edai-root #edai-lead label:has(input[name="consent"]) {
  cursor: pointer;
  align-items: flex-start;
}

/* v1.3.14: mobile visual viewport / on-screen keyboard containment. */
@media(max-width:600px){
  #edai-root{bottom:calc(12px + var(--edai-keyboard-offset, 0px));}
  #edai-panel{
    height:min(660px, calc(var(--edai-visible-height, 100dvh) - 85px));
    max-height:calc(var(--edai-visible-height, 100dvh) - 85px);
  }
  #edai-lead textarea{min-height:120px;}
  #edai-log,#edai-lead{-webkit-overflow-scrolling:touch;overscroll-behavior:contain;}
}
