/* Marketing site chat — terminal panel + launcher */

.pm-chat-launcher{
  position:fixed;
  right:20px;
  bottom:20px;
  z-index:180;
  display:flex;
  align-items:center;
  gap:10px;
  height:48px;
  padding:0 16px 0 14px;
  border:1px solid var(--line,#22262B);
  border-radius:2px;
  background:#0A0A0A;
  color:var(--white,#fff);
  font-family:'IBM Plex Mono',ui-monospace,monospace;
  font-size:12px;
  letter-spacing:.14em;
  text-transform:uppercase;
  cursor:pointer;
  box-shadow:0 12px 40px rgba(0,0,0,.45);
}
.pm-chat-launcher:hover{background:#111;border-color:#3a4048}
.pm-chat-launcher .pm-chat-launcher-mark{
  width:10px;height:10px;border-radius:1px;
  background:var(--silver,#D8DEE4);
  box-shadow:0 0 0 1px rgba(255,255,255,.15);
}
.pm-chat-launcher[hidden],
.pm-chat-panel[hidden]{display:none !important}

.pm-chat-panel{
  position:fixed;
  right:20px;
  bottom:20px;
  z-index:190;
  width:min(420px, calc(100vw - 24px));
  height:min(640px, calc(100vh - 40px));
  display:flex;
  flex-direction:column;
  background:#070707;
  border:1px solid var(--line,#22262B);
  border-radius:2px;
  color:var(--silver,#D8DEE4);
  font-family:'Inter',system-ui,sans-serif;
  box-shadow:0 24px 80px rgba(0,0,0,.55);
  overflow:hidden;
}
.pm-chat-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 16px;
  border-bottom:1px solid var(--line,#22262B);
  background:#0A0A0A;
}
.pm-chat-head-title{
  font-family:'IBM Plex Mono',ui-monospace,monospace;
  font-size:11px;
  letter-spacing:.16em;
  text-transform:uppercase;
  color:var(--white,#fff);
}
.pm-chat-head-sub{
  display:block;
  margin-top:4px;
  font-size:10px;
  letter-spacing:.08em;
  color:var(--grey-2,#5A626B);
  text-transform:uppercase;
}
.pm-chat-close{
  width:36px;height:36px;
  border:1px solid var(--line,#22262B);
  background:transparent;
  color:var(--white,#fff);
  font-size:20px;
  line-height:1;
  cursor:pointer;
  border-radius:2px;
}
.pm-chat-close:hover{background:#fff;color:#000}

.pm-chat-body{
  flex:1;
  overflow:auto;
  padding:16px;
  display:flex;
  flex-direction:column;
  gap:14px;
}

.pm-chat-identity{
  display:flex;
  flex-direction:column;
  gap:12px;
}
.pm-chat-identity h3{
  font-family:'Newsreader',Georgia,serif;
  font-weight:500;
  font-size:22px;
  color:#fff;
  letter-spacing:-.02em;
}
.pm-chat-identity p{
  font-size:13px;
  line-height:1.55;
  color:var(--grey,#8A929B);
}
.pm-chat-field{display:flex;flex-direction:column;gap:6px}
.pm-chat-field label{
  font-family:'IBM Plex Mono',ui-monospace,monospace;
  font-size:10px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--grey-2,#5A626B);
}
.pm-chat-field input{
  height:42px;
  padding:0 12px;
  border:1px solid var(--line,#22262B);
  border-radius:2px;
  background:#0F1114;
  color:#fff;
  font:inherit;
  font-size:14px;
}
.pm-chat-field input:focus{
  outline:none;
  border-color:#5A626B;
}
.pm-chat-consent{
  display:flex;
  gap:10px;
  align-items:flex-start;
  font-size:12px;
  line-height:1.45;
  color:var(--grey,#8A929B);
}
.pm-chat-consent input{margin-top:3px}
.pm-chat-id-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:4px;
}
.pm-chat-btn{
  font-family:'IBM Plex Mono',ui-monospace,monospace;
  font-size:11px;
  letter-spacing:.12em;
  text-transform:uppercase;
  border:1px solid var(--line,#22262B);
  border-radius:2px;
  padding:11px 14px;
  cursor:pointer;
  background:transparent;
  color:#fff;
}
.pm-chat-btn:hover{background:#fff;color:#000}
.pm-chat-btn.primary{background:#fff;color:#000}
.pm-chat-btn.primary:hover{background:#D8DEE4}
.pm-chat-btn:disabled{opacity:.45;cursor:not-allowed}
.pm-chat-btn.ghost{color:var(--grey,#8A929B)}

.pm-chat-msg{
  display:flex;
  flex-direction:column;
  gap:8px;
  max-width:100%;
}
.pm-chat-msg.user .pm-chat-bubble{
  align-self:flex-end;
  background:#14171A;
  border:1px solid var(--line,#22262B);
  color:#fff;
}
.pm-chat-msg.assistant .pm-chat-bubble{
  align-self:stretch;
  background:transparent;
  border:none;
  padding:0;
}
.pm-chat-bubble{
  padding:12px 14px;
  border-radius:2px;
  font-size:14px;
  line-height:1.55;
  white-space:pre-wrap;
}
.pm-chat-bubble strong{color:#fff;font-weight:600}
.pm-chat-role{
  font-family:'IBM Plex Mono',ui-monospace,monospace;
  font-size:10px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color:var(--grey-2,#5A626B);
}
.pm-chat-msg.user .pm-chat-role{align-self:flex-end}

.pm-chat-refuse{
  border:1px solid #3a2a2a;
  background:#120a0a;
  padding:14px;
  border-radius:2px;
}
.pm-chat-refuse .pm-chat-bubble{color:#E8C4C4}

.pm-chat-coverage{
  display:flex;
  flex-direction:column;
  gap:6px;
  margin-top:4px;
}
.pm-chat-coverage-meta{
  display:flex;
  justify-content:space-between;
  font-family:'IBM Plex Mono',ui-monospace,monospace;
  font-size:10px;
  letter-spacing:.1em;
  text-transform:uppercase;
  color:var(--grey-2,#5A626B);
}
.pm-chat-coverage-bar{
  height:3px;
  background:#1a1d21;
  border-radius:1px;
  overflow:hidden;
}
.pm-chat-coverage-fill{
  height:100%;
  background:#D8DEE4;
  width:0;
  transition:width .25s ease;
}
.pm-chat-coverage.low .pm-chat-coverage-fill{background:#A66}

.pm-chat-evidence{
  margin-top:8px;
  border-top:1px solid var(--line,#22262B);
  padding-top:10px;
}
.pm-chat-evidence summary{
  cursor:pointer;
  font-family:'IBM Plex Mono',ui-monospace,monospace;
  font-size:10px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--grey,#8A929B);
  list-style:none;
}
.pm-chat-evidence summary::-webkit-details-marker{display:none}
.pm-chat-evidence ul{
  margin:10px 0 0;
  padding:0;
  list-style:none;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.pm-chat-evidence li{
  font-size:12px;
  line-height:1.4;
  color:var(--grey,#8A929B);
  border-left:2px solid #22262B;
  padding-left:10px;
}
.pm-chat-evidence .src-id{
  font-family:'IBM Plex Mono',ui-monospace,monospace;
  font-size:10px;
  letter-spacing:.08em;
  color:#fff;
  margin-right:6px;
}

.pm-chat-chips{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:8px;
}
.pm-chat-chip{
  font-family:'IBM Plex Mono',ui-monospace,monospace;
  font-size:10px;
  letter-spacing:.1em;
  text-transform:uppercase;
  border:1px solid var(--line,#22262B);
  background:transparent;
  color:var(--silver,#D8DEE4);
  padding:8px 10px;
  border-radius:2px;
  cursor:pointer;
}
.pm-chat-chip:hover{border-color:#5A626B;color:#fff}

.pm-chat-actions{
  display:flex;
  flex-direction:column;
  gap:8px;
  margin-top:10px;
  padding-top:10px;
  border-top:1px solid var(--line,#22262B);
}
.pm-chat-actions-label{
  font-family:'IBM Plex Mono',ui-monospace,monospace;
  font-size:10px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--grey-2,#5A626B);
}
.pm-chat-action-row{display:flex;flex-wrap:wrap;gap:8px}
.pm-chat-locked{
  font-size:12px;
  color:var(--grey,#8A929B);
  font-family:'IBM Plex Mono',ui-monospace,monospace;
  letter-spacing:.06em;
}

.pm-chat-foot{
  border-top:1px solid var(--line,#22262B);
  padding:12px;
  background:#0A0A0A;
}
.pm-chat-cmd{
  display:flex;
  align-items:flex-end;
  gap:8px;
  border:1px solid var(--line,#22262B);
  background:#0F1114;
  border-radius:2px;
  padding:10px 12px;
}
.pm-chat-cmd-prompt{
  font-family:'IBM Plex Mono',ui-monospace,monospace;
  color:var(--grey-2,#5A626B);
  font-size:14px;
  line-height:1.4;
  padding-bottom:2px;
}
.pm-chat-cmd textarea{
  flex:1;
  resize:none;
  border:0;
  outline:none;
  background:transparent;
  color:#fff;
  font-family:'IBM Plex Mono',ui-monospace,monospace;
  font-size:13px;
  line-height:1.45;
  min-height:40px;
  max-height:120px;
}
.pm-chat-send{
  border:1px solid var(--line,#22262B);
  background:transparent;
  color:#fff;
  font-family:'IBM Plex Mono',ui-monospace,monospace;
  font-size:10px;
  letter-spacing:.12em;
  text-transform:uppercase;
  padding:10px 12px;
  cursor:pointer;
  border-radius:2px;
  height:fit-content;
}
.pm-chat-send:hover{background:#fff;color:#000}
.pm-chat-send:disabled{opacity:.4;cursor:not-allowed}
.pm-chat-err{
  color:#E8C4C4;
  font-size:12px;
  margin-top:8px;
  font-family:'IBM Plex Mono',ui-monospace,monospace;
}
.pm-chat-ticket{
  display:flex;
  flex-direction:column;
  gap:10px;
  border:1px solid var(--line,#22262B);
  padding:12px;
  background:#0F1114;
}
.pm-chat-ticket textarea,
.pm-chat-ticket input,
.pm-chat-ticket select{
  width:100%;
  border:1px solid var(--line,#22262B);
  background:#070707;
  color:#fff;
  border-radius:2px;
  padding:10px;
  font:inherit;
  font-size:13px;
}
.pm-chat-ticket textarea{min-height:90px;resize:vertical}

.pm-chat-tier-card{
  display:flex;
  flex-direction:column;
  gap:8px;
  border:1px solid var(--line,#22262B);
  padding:12px;
  background:#0F1114;
}
.pm-chat-tier-row{
  display:flex;
  justify-content:space-between;
  gap:10px;
  font-size:13px;
}
.pm-chat-tier-row strong{color:#fff;font-weight:500}
.pm-chat-interval{
  display:flex;
  gap:8px;
  margin:4px 0 8px;
}

@media (max-width:560px){
  .pm-chat-launcher{right:12px;bottom:12px}
  .pm-chat-panel{
    inset:0;
    width:100vw;
    height:100vh;
    right:0;bottom:0;
    border:0;
  }
}

@media (prefers-reduced-motion:reduce){
  .pm-chat-coverage-fill{transition:none}
}
