﻿:root { --tcw-ink:#15181c; --tcw-paper:#fff; --tcw-line:#ded9d1; --tcw-muted:#5c636e; --tcw-accent:#c8891a; }
.tcw-root { position:fixed; right:18px; bottom:18px; z-index:9999; font:14px/1.5 ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif; color:var(--tcw-ink); }
.tcw-toggle { display:flex; align-items:center; gap:8px; border:0; border-radius:999px; padding:12px 17px; background:var(--tcw-accent); color:#1b1305; font:inherit; font-weight:700; cursor:pointer; box-shadow:0 8px 24px rgba(21,24,28,.25); }
.tcw-toggle:hover { filter:brightness(1.06); }
.tcw-toggle svg { width:18px; height:18px; }
.tcw-panel { width:min(370px,calc(100vw - 24px)); height:min(540px,calc(100vh - 36px)); display:flex; flex-direction:column; background:var(--tcw-paper); border:1px solid var(--tcw-line); border-radius:16px; overflow:hidden; box-shadow:0 24px 60px rgba(21,24,28,.28); }
.tcw-panel[hidden], .tcw-toggle[hidden] { display:none; }
.tcw-head { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:13px 14px; background:var(--tcw-ink); color:#fff; }
.tcw-head strong { font-size:14px; }
.tcw-head small { display:block; color:#c9cdd3; font-size:10px; font-weight:500; }
.tcw-close { border:0; background:transparent; color:#fff; font:inherit; font-size:22px; line-height:1; cursor:pointer; padding:2px 5px; }
.tcw-thread { flex:1; overflow:auto; padding:14px; display:flex; flex-direction:column; gap:9px; background:#faf9f7; }
.tcw-msg { max-width:88%; padding:9px 11px; border-radius:10px; font-size:13px; line-height:1.5; white-space:pre-wrap; }
.tcw-msg.user { align-self:flex-end; background:#eef3f7; border:1px solid #dce6ee; }
.tcw-msg.assistant { align-self:flex-start; background:#fff; border:1px solid var(--tcw-line); }
.tcw-msg.error { color:#a52a2a; }
.tcw-form { display:flex; gap:7px; padding:10px; border-top:1px solid var(--tcw-line); background:#fff; }
.tcw-form textarea { flex:1; resize:none; min-height:42px; max-height:110px; padding:9px 10px; border:1px solid var(--tcw-line); border-radius:8px; font:inherit; font-size:13px; outline:none; }
.tcw-form textarea:focus { border-color:var(--tcw-accent); box-shadow:0 0 0 3px rgba(200,137,26,.12); }
.tcw-web { display:flex; align-items:center; gap:4px; color:var(--tcw-muted); font-size:11px; white-space:nowrap; }
.tcw-web input { accent-color:var(--tcw-accent); }
.tcw-form button { border:0; border-radius:8px; padding:0 13px; background:var(--tcw-accent); color:#1b1305; font:inherit; font-weight:700; cursor:pointer; }
.tcw-form button:disabled { opacity:.5; cursor:wait; }
.tcw-foot { padding:0 12px 9px; color:var(--tcw-muted); font-size:10px; background:#fff; }
.tcw-empty { color:var(--tcw-muted); font-size:12px; line-height:1.6; padding:4px 2px; }
.tcw-prompt { align-self:flex-start; border:1px solid var(--tcw-line); border-radius:999px; padding:6px 9px; background:#fff; color:var(--tcw-muted); font:inherit; font-size:11px; cursor:pointer; text-align:left; }
.tcw-prompt:hover { color:var(--tcw-ink); border-color:var(--tcw-accent); }
@media (max-width:520px) { .tcw-root { right:10px; bottom:10px; } .tcw-panel { height:min(70vh,540px); } }

.tcw-action { align-self:stretch; border:1px solid #c8891a; border-radius:10px; background:#fff8e7; padding:10px; font-size:12px; display:flex; flex-direction:column; gap:7px; }
.tcw-action strong { font-size:12px; }
.tcw-action p { margin:0; color:#5c636e; line-height:1.45; }
.tcw-action-buttons { display:flex; gap:7px; }
.tcw-action-buttons button { border:0; border-radius:7px; padding:6px 10px; background:#c8891a; color:#1b1305; font:inherit; font-weight:700; cursor:pointer; }
.tcw-action-buttons button.quiet { background:#fff; border:1px solid #ded9d1; color:#5c636e; font-weight:500; }
.tcw-action-buttons button:disabled { opacity:.55; cursor:wait; }
.tcw-action-status { color:#a52a2a; font-size:11px; }
.tcw-action-link { color:#9d5b12; font-weight:700; }
.tcw-feedback{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin-top:7px;padding-top:6px;border-top:1px dashed #ded9d1;font-size:10px;color:#5c636e}.tcw-feedback button{border:1px solid #ded9d1;background:#fff;color:#5c636e;border-radius:999px;padding:3px 7px;font:inherit;cursor:pointer}.tcw-feedback button:hover{border-color:#c8891a;color:#15181c}.tcw-feedback-status{color:#5c636e}.tcw-feedback-box{display:flex;flex-direction:column;gap:5px;margin-top:6px}.tcw-feedback-box textarea{width:100%;border:1px solid #ded9d1;border-radius:7px;padding:6px;font:inherit;font-size:11px;resize:vertical}.tcw-feedback-box button{align-self:flex-start;border:0;border-radius:6px;background:#c8891a;color:#1b1305;padding:4px 8px;font:inherit;font-size:11px;font-weight:700;cursor:pointer}

/* The persistent presence rail. The public site keeps the small floating chat;
   a signed-in contractor gets the companion that lives on the page. */
.tcw-root.tcw-presence { top: 76px; right: 16px; bottom: 16px; }
.tcw-presence .tcw-panel { width: 350px; height: min(720px, calc(100vh - 92px)); border-radius: 12px; box-shadow: 0 18px 48px rgba(21,24,28,.22); }
.tcw-presence .tcw-head { background: #20242a; }
.tcw-presence .tcw-head small { color: #b9c0ca; }
.tcw-presence .tcw-toggle { display: flex; }
.tcw-presence .tcw-foot { display: none; }
.tcw-presence .tcw-thread { background: #f7f6f3; }
.tcw-presence .tcw-msg.assistant { background: #fff; border-color: #ddd7cc; }
.tcw-presence .tcw-form textarea { min-height: 46px; }
@media (min-width: 1100px) {
  body.tcw-presence-body { padding-right: 382px; }
  body.tcw-presence-body header, body.tcw-presence-body main { max-width: calc(100vw - 382px); }
}
@media (max-width: 1099px) {
  body.tcw-presence-body { padding-right: 0; }
  .tcw-root.tcw-presence { top: auto; right: 10px; bottom: 10px; }
  .tcw-presence .tcw-panel { width: min(370px, calc(100vw - 20px)); height: min(72vh, 560px); }
}

/* Presence lives in the account menu: a dropdown panel when open, a floating
   bee when minimised. It no longer reserves a column of the page. */
.tcw-root.tcw-presence { top: auto; right: 18px; bottom: 18px; }
.tcw-presence .tcw-panel {
  position: fixed; top: 76px; right: 16px; bottom: auto;
  width: 360px; height: min(620px, calc(100vh - 96px));
  border-radius: 12px; box-shadow: 0 18px 48px rgba(21,24,28,.26);
}
.tcw-presence .tcw-toggle {
  width: 56px; height: 56px; padding: 0; border-radius: 50%;
  justify-content: center; font-size: 26px; line-height: 1;
}
.tcw-bee { display: block; transform: translateY(-1px); }
.tcw-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
body.tcw-presence-body { padding-right: 0; }
body.tcw-presence-body header, body.tcw-presence-body main { max-width: none; }
@media (max-width: 1099px) {
  .tcw-root.tcw-presence { right: 10px; bottom: 10px; }
  .tcw-presence .tcw-panel {
    top: 70px; left: 10px; right: 10px; width: auto;
    height: min(72vh, 560px);
  }
}
