/* ─── Chat-only overrides (loaded ON TOP of site.css) ───────────────
   The page shell stays purple; only the chat panel + input bar get
   the terminal black/lime/mono treatment. */

#chatWrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px 20px;
  min-height: 0;
}
#chatCol {
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

#chat {
  flex: 1;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  background: #0a0a0a;
  color: #f5f5f5;
  font-family: var(--mono);
  border: 1px solid var(--lime);
  border-radius: 6px 6px 0 0;
  border-bottom: none;
  box-shadow: 0 0 20px rgba(163,230,53,0.12) inset,
              0 12px 40px rgba(0,0,0,0.55);
}

.msg {
  margin-bottom: 14px;
  padding: 10px 14px;
  border-radius: 4px;
  max-width: 82%;
  line-height: 1.5;
  font-size: 13.5px;
  font-family: var(--mono);
  white-space: pre-wrap;
  word-wrap: break-word;
}
.msg.user {
  background: #0f0f0f;
  color: #f5f5f5;
  align-self: flex-end;
  border: 1px solid #2a2a2a;
}
.msg.user::before {
  content: "user@you:~$ ";
  color: var(--lime);
  font-weight: 700;
}
.msg.assistant {
  background: #0a0f06;
  color: #f5f5f5;
  align-self: flex-start;
  border: 1px solid rgba(163,230,53,0.35);
  box-shadow: 0 0 8px rgba(163,230,53,0.08);
}

#inputBar {
  display: flex;
  padding: 10px;
  gap: 8px;
  background: #0a0a0a;
  border: 1px solid var(--lime);
  border-top: 1px solid #1a1a1a;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.55);
}
#inputBar input[type="text"] {
  flex: 1;
  padding: 10px 12px;
  border-radius: 4px;
  border: 1px solid #2a2a2a;
  font-size: 14px;
  font-family: var(--mono);
  background: #000000;
  color: var(--lime-bright);
  caret-color: var(--lime);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
#inputBar input[type="text"]::placeholder { color: #555; }
#inputBar input[type="text"]:focus {
  border-color: var(--lime);
  box-shadow: 0 0 0 2px var(--lime-soft);
}

#inputBar button,
#chat button {
  padding: 9px 18px;
  border-radius: 4px;
  border: 1px solid var(--lime);
  background: transparent;
  color: var(--lime);
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .12s, color .12s, box-shadow .15s;
}
#inputBar button:hover,
#chat button:hover {
  background: var(--lime);
  color: #000;
  box-shadow: 0 0 14px rgba(163,230,53,0.55);
}
#inputBar button:active,
#chat button:active { transform: translateY(1px); }

#chat pre {
  position: relative;
  background: #050505;
  border: 1px solid rgba(163,230,53,0.25);
  border-radius: 4px;
  padding: 10px;
  overflow-x: auto;
}
#chat pre code.hljs,
#chat code.hljs {
  background: #050505 !important;
  color: var(--lime-bright) !important;
  font-family: var(--mono);
}
#chat code {
  background: #0a0a0a;
  color: var(--lime-bright);
  padding: 1px 4px;
  border-radius: 3px;
  font-family: var(--mono);
}
#chat a { color: var(--lime); }

.copy-btn {
  position: absolute;
  top: 6px;
  right: 6px;
  background: transparent;
  border: 1px solid var(--lime);
  padding: 2px 8px;
  font-size: 11px;
  font-family: var(--mono);
  cursor: pointer;
  color: var(--lime);
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.copy-btn:hover { background: var(--lime); color: #000; }

.meta-cite {
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(163,230,53,0.25);
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--mono);
}

@media (max-width: 640px) {
  #chatWrap { padding: 12px 8px 8px; }
  #chatCol  { max-width: 100%; }
  .msg      { max-width: 90%; }
}
