/* ==========================================================================
   Henshin AI — Chat mockup styles
   Sits on top of styles.css and inherits all design tokens (colors, fonts,
   --grad-primary card surface, aqua/amber/lime palette). Everything here is
   scoped under .chat-page / .chat-shell so it never leaks into the
   dashboard.
   ========================================================================== */

body.chat-page {
  overflow: hidden;  /* layout owns its own scrolling */
}

/* ----- Shell: left rail + main thread ------------------------------------ */
.chat-shell {
  display: grid;
  grid-template-columns: 300px 1fr;
  height: calc(100vh - 68px);  /* topbar is 68px */
  width: 100%;
  background: var(--grad-page, var(--grad-hero));
}

/* =========================================================================
   LEFT RAIL
   ========================================================================= */
.chat-rail {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 16px 12px;
  gap: 14px;
  border-right: 1px solid var(--border-soft);
  background: rgba(8, 32, 42, 0.55);
  backdrop-filter: saturate(140%) blur(8px);
  overflow: hidden;
}

/* New-conversation button */
.rail-new-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #5DD5D5;
  background: rgba(93, 213, 213, 0.08);
  color: #FFFFFF;
  font-family: "Oxanium", sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 120ms ease, transform 120ms ease;
}
.rail-new-btn:hover {
  background: rgba(93, 213, 213, 0.14);
  transform: translateY(-1px);
}
.rail-new-btn i { color: #5DD5D5; font-size: 16px; }
.rail-new-btn span { flex: 1; text-align: left; }
.rail-kbd {
  font-family: "Electrolize", monospace;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(127, 196, 207, 0.14);
  color: var(--ink-secondary);
  border: 1px solid var(--border-soft);
}

/* Search */
.rail-search {
  position: relative;
  display: flex;
  align-items: center;
}
.rail-search i {
  position: absolute;
  left: 10px;
  color: var(--ink-tertiary);
  font-size: 14px;
  pointer-events: none;
}
.rail-search input {
  width: 100%;
  padding: 8px 10px 8px 32px;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  background: rgba(8, 32, 42, 0.6);
  color: var(--ink-primary);
  font-family: "Oxanium", sans-serif;
  font-size: 12px;
  outline: none;
  transition: border-color 120ms ease;
}
.rail-search input::placeholder { color: var(--ink-tertiary); }
.rail-search input:focus { border-color: #5DD5D5; }

/* Sections */
.rail-section { display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.rail-section:nth-of-type(2) { flex: 1 1 auto; overflow-y: auto; }
.rail-section-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px;
  color: var(--ink-tertiary);
  font-size: 11px;
}
.rail-section-head i { font-size: 12px; color: #5DD5D5; }
.rail-section-head .panel-label { font-size: 11px; letter-spacing: 0.14em; }

/* Pinned insights */
.rail-pinned {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pinned-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 120ms ease;
}
.pinned-item:hover { background: rgba(127, 196, 207, 0.06); }
.pinned-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-top: 7px;
  flex-shrink: 0;
  /* Single muted accent — color stops being decoration and lets the
     title carry the semantic. */
  background: var(--blue-light, #7FC4CF);
  opacity: 0.7;
}
.pinned-body { min-width: 0; }
.pinned-title {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink-primary);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pinned-meta {
  font-size: 10.5px;
  color: var(--ink-tertiary);
  margin-top: 2px;
}

/* Conversation list */
.rail-convos {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.convo-item {
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease;
  border: 1px solid transparent;
}
.convo-item:hover { background: rgba(127, 196, 207, 0.06); }
.convo-item.is-active {
  background: rgba(93, 213, 213, 0.10);
  border-color: rgba(93, 213, 213, 0.35);
}
.convo-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-primary);
  line-height: 1.3;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.convo-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  color: var(--ink-tertiary);
}
.convo-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(127, 196, 207, 0.10);
  color: var(--ink-secondary);
  font-family: "Electrolize", monospace;
  font-size: 9.5px;
  letter-spacing: 0.04em;
}

/* Sources footer */
.rail-footer {
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
}
.rail-footer-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10.5px;
  color: var(--ink-tertiary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
  padding: 0 4px;
}
.rail-footer-label i { color: #A8D68E; font-size: 12px; }
.source-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.source-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 9px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: rgba(8, 32, 42, 0.6);
  color: var(--ink-secondary);
  font-family: "Oxanium", sans-serif;
  font-size: 11px;
  cursor: default;
}
.source-chip i { font-size: 12px; }
.source-chip.is-live {
  color: var(--ink-primary);
  border-color: rgba(168, 214, 142, 0.4);
}
.source-chip.is-live .source-dot {
  background: #A8D68E;
  box-shadow: 0 0 6px #A8D68E;
}
.source-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-tertiary);
  flex-shrink: 0;
}

/* =========================================================================
   MAIN THREAD
   ========================================================================= */
.chat-main {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 0;
  background:
    radial-gradient(800px 500px at 80% 0%, rgba(93, 213, 213, 0.05), transparent 60%),
    transparent;
}

/* ---- Thread header ---- */
.thread-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 32px 18px;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(8, 32, 42, 0.4);
}
.thread-title-wrap { flex: 1; min-width: 0; }
.thread-title {
  font-family: "Electrolize", sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: #FFFFFF;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}
.thread-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.grounding-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(168, 214, 142, 0.4);
  background: rgba(168, 214, 142, 0.08);
  color: var(--ink-primary);
  font-family: "Oxanium", sans-serif;
  font-size: 11.5px;
  font-weight: 500;
}
.grounding-pill i { color: #A8D68E; font-size: 14px; }
.grounding-pill strong { color: #A8D68E; font-weight: 700; }
.pill-sep { color: var(--ink-tertiary); }

.range-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: rgba(8, 32, 42, 0.6);
  color: var(--ink-primary);
  font-family: "Oxanium", sans-serif;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
}
.range-pill:hover { border-color: #5DD5D5; background: rgba(93, 213, 213, 0.08); }
.range-pill i { font-size: 13px; }
.range-pill i:last-child { color: var(--ink-tertiary); }

.thread-actions { display: flex; gap: 4px; flex-shrink: 0; }

/* ---- Scrollable message list ---- */
.thread-scroll {
  overflow-y: auto;
  padding: 24px 32px 12px;
  scroll-behavior: smooth;
}
.thread-scroll::-webkit-scrollbar { width: 10px; }
.thread-scroll::-webkit-scrollbar-track { background: transparent; }
.thread-scroll::-webkit-scrollbar-thumb {
  background: rgba(127, 196, 207, 0.15);
  border-radius: 5px;
}
.thread-scroll::-webkit-scrollbar-thumb:hover { background: rgba(127, 196, 207, 0.3); }

/* Date divider */
.thread-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 8px 0 20px;
  color: var(--ink-tertiary);
  font-family: "Oxanium", sans-serif;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.thread-divider::before,
.thread-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-soft);
}

/* =========================================================================
   MESSAGES
   ========================================================================= */
.msg {
  display: grid;
  gap: 12px;
  margin-bottom: 28px;
}

/* USER — right-aligned bubble */
.msg-user {
  grid-template-columns: 1fr;
  justify-items: end;
}
.msg-user .msg-body { max-width: 640px; }
.msg-user .msg-bubble {
  background: linear-gradient(135deg, #5DD5D5 0%, #3D8FA0 100%);
  color: #0B2028;
  padding: 10px 14px;
  border-radius: 14px 14px 4px 14px;
  font-family: "Oxanium", sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  box-shadow: 0 2px 10px rgba(93, 213, 213, 0.15);
}
.msg-user .msg-meta {
  text-align: right;
  font-size: 10.5px;
  color: var(--ink-tertiary);
  margin-top: 4px;
  font-family: "Electrolize", monospace;
  letter-spacing: 0.04em;
}

/* AI — avatar + body */
.msg-ai {
  grid-template-columns: 32px 1fr;
}
.msg-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0B2028 0%, #12404C 100%);
  border: 1px solid rgba(93, 213, 213, 0.4);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 0 12px rgba(93, 213, 213, 0.2);
}
.avatar-mark {
  display: block;
  width: 14px;
  height: 14px;
  background: url('/logos/henshin-logo-white.png') no-repeat center / contain;
  opacity: 0.95;
}
.msg-ai .msg-body {
  min-width: 0;
  max-width: 780px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Message text blocks */
.msg-text {
  font-family: "Oxanium", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-primary);
}
.msg-text strong { color: #FFFFFF; font-weight: 600; }
.msg-text code,
.path {
  font-family: "Electrolize", monospace;
  font-size: 12.5px;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(93, 213, 213, 0.08);
  color: #5DD5D5;
  border: 1px solid rgba(93, 213, 213, 0.18);
}

.msg-list {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: "Oxanium", sans-serif;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-primary);
}
.msg-list li::marker { color: #5DD5D5; }

/* Inline delta chip */
.delta-inline {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px 6px;
  border-radius: 4px;
  font-family: "Electrolize", monospace;
  font-size: 11px;
  font-weight: 600;
  vertical-align: baseline;
}
.delta-inline.up {
  background: rgba(168, 214, 142, 0.15);
  color: #A8D68E;
}
.delta-inline.down {
  background: rgba(255, 155, 122, 0.15);
  color: #FF9B7A;
}
.delta-inline i { font-size: 12px; }

/* Citation superscript */
.cite-ref {
  display: inline-block;
  font-size: 10px;
  font-family: "Electrolize", monospace;
  color: #5DD5D5;
  background: rgba(93, 213, 213, 0.12);
  border-radius: 3px;
  padding: 1px 4px;
  margin-left: 2px;
  vertical-align: super;
  cursor: pointer;
}
.cite-ref:hover { background: rgba(93, 213, 213, 0.25); }

/* =========================================================================
   TOOL CALL TIMELINE
   ========================================================================= */
.tool-calls {
  border-radius: 8px;
  background: rgba(8, 32, 42, 0.6);
  border: 1px solid var(--border-soft);
  overflow: hidden;
  font-family: "Oxanium", sans-serif;
}
.tool-calls summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  cursor: pointer;
  list-style: none;
  font-size: 11.5px;
  color: var(--ink-secondary);
  user-select: none;
}
.tool-calls summary::-webkit-details-marker { display: none; }
.tool-calls summary > i:first-child {
  color: #5DD5D5;
  font-size: 13px;
}
.tool-calls summary span:nth-of-type(1) {
  color: var(--ink-primary);
  font-weight: 500;
}
.tool-dot { color: var(--ink-tertiary); }
.tool-latency {
  font-family: "Electrolize", monospace;
  color: #A8D68E;
  font-size: 11px;
}
.tool-chevron {
  margin-left: auto;
  font-size: 14px;
  transition: transform 160ms ease;
  color: var(--ink-tertiary);
}
.tool-calls[open] .tool-chevron { transform: rotate(180deg); }

.tool-list {
  list-style: none;
  margin: 0;
  padding: 0 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  border-top: 1px solid var(--border-soft);
  padding-top: 10px;
  margin-top: 2px;
}
.tool-list li {
  display: grid;
  grid-template-columns: 16px auto 1fr auto;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--ink-secondary);
}
.tool-icon { color: #5DD5D5; font-size: 13px; }
.tool-list code {
  font-family: "Electrolize", monospace;
  color: #FBB80F;
  background: none;
  border: none;
  padding: 0;
  font-size: 11.5px;
}
.tool-args {
  color: var(--ink-tertiary);
  font-family: "Electrolize", monospace;
  font-size: 10.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tool-ok {
  font-family: "Electrolize", monospace;
  font-size: 10.5px;
  color: #A8D68E;
  flex-shrink: 0;
}

/* =========================================================================
   INLINE RENDERED CARDS (AI responses render dashboard primitives)
   ========================================================================= */
.msg-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.mini-card {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--grad-primary, linear-gradient(135deg, #0F3A42 0%, #0B2028 100%));
  border: 1px solid var(--border-soft);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mini-card-label {
  font-family: "Oxanium", sans-serif;
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
}
.mini-card-value {
  font-family: "Zen Dots", monospace;
  font-size: 20px;
  color: #FFFFFF;
  line-height: 1;
  letter-spacing: -0.02em;
}
.mini-card-delta {
  font-family: "Electrolize", monospace;
  font-size: 11px;
  letter-spacing: 0.02em;
}
.mini-card-delta.up { color: #A8D68E; }
.mini-card-delta.down { color: #FF9B7A; }
.mini-card-delta.neutral { color: var(--ink-secondary); }

@media (max-width: 900px) {
  .msg-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* =========================================================================
   INLINE TABLE
   ========================================================================= */
.inline-table-wrap {
  border-radius: 10px;
  border: 1px solid var(--border-soft);
  background: rgba(8, 32, 42, 0.5);
  overflow: hidden;
}
.inline-table-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-soft);
  font-family: "Oxanium", sans-serif;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
}
.inline-table-head i { color: #5DD5D5; font-size: 13px; }
.inline-table-head span { color: var(--ink-primary); letter-spacing: 0.08em; }
.inline-table-link {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #5DD5D5;
  font-size: 11px;
  text-transform: none;
  letter-spacing: 0;
  text-decoration: none;
}
.inline-table-link:hover { color: #FFFFFF; }

.inline-table {
  width: 100%;
  border-collapse: collapse;
  font-family: "Oxanium", sans-serif;
  font-size: 12.5px;
}
.inline-table thead th {
  text-align: left;
  padding: 8px 14px;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
  background: rgba(8, 32, 42, 0.3);
}
.inline-table th.num,
.inline-table td.num { text-align: right; }
.inline-table tbody td {
  padding: 8px 14px;
  border-top: 1px solid var(--border-soft);
  color: var(--ink-primary);
}
.inline-table tbody tr:hover td { background: rgba(93, 213, 213, 0.04); }

.share-bar {
  display: inline-block;
  width: 60px;
  height: 4px;
  border-radius: 2px;
  background: rgba(127, 196, 207, 0.12);
  margin-right: 8px;
  vertical-align: middle;
  overflow: hidden;
}
.share-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #5DD5D5 0%, #3D8FA0 100%);
  border-radius: 2px;
}

/* =========================================================================
   ALERT CARD (anomalies, flags)
   ========================================================================= */
.alert-card {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid;
  align-items: start;
}
.alert-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}
.alert-card.alert-warn {
  border-color: rgba(251, 184, 15, 0.35);
  background: rgba(251, 184, 15, 0.06);
}
.alert-card.alert-warn .alert-icon {
  background: rgba(251, 184, 15, 0.15);
  color: #FBB80F;
}
.alert-card.alert-info {
  border-color: rgba(93, 213, 213, 0.35);
  background: rgba(93, 213, 213, 0.06);
}
.alert-card.alert-info .alert-icon {
  background: rgba(93, 213, 213, 0.15);
  color: #5DD5D5;
}
.alert-title {
  font-family: "Oxanium", sans-serif;
  font-weight: 600;
  font-size: 13px;
  color: #FFFFFF;
  margin-bottom: 3px;
}
.alert-text {
  font-family: "Oxanium", sans-serif;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-primary);
}
.alert-text strong { color: #FBB80F; font-weight: 600; }

/* =========================================================================
   CITATIONS
   ========================================================================= */
.msg-citations {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 4px;
}
.cite-label {
  font-family: "Oxanium", sans-serif;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
  margin-right: 4px;
}
.cite-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: rgba(8, 32, 42, 0.6);
  color: var(--ink-primary);
  font-family: "Oxanium", sans-serif;
  font-size: 11.5px;
  text-decoration: none;
  transition: border-color 120ms ease, background 120ms ease;
}
.cite-chip:hover {
  border-color: #5DD5D5;
  background: rgba(93, 213, 213, 0.08);
}
.cite-chip i { font-size: 12px; color: var(--ink-secondary); }
.cite-num {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(93, 213, 213, 0.18);
  color: #5DD5D5;
  font-family: "Electrolize", monospace;
  font-size: 10px;
  font-weight: 700;
}

/* =========================================================================
   MESSAGE ACTIONS
   ========================================================================= */
.msg-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-top: 2px;
  opacity: 0.7;
  transition: opacity 120ms ease;
}
.msg-ai:hover .msg-actions { opacity: 1; }
.msg-act {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-secondary);
  font-family: "Oxanium", sans-serif;
  font-size: 11.5px;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.msg-act:hover {
  background: rgba(127, 196, 207, 0.08);
  color: var(--ink-primary);
  border-color: var(--border-soft);
}
.msg-act i { font-size: 13px; }
.msg-act-primary {
  color: #5DD5D5;
  border-color: rgba(93, 213, 213, 0.25);
}
.msg-act-primary:hover {
  background: rgba(93, 213, 213, 0.1);
  color: #FFFFFF;
  border-color: #5DD5D5;
}

/* =========================================================================
   AI FOLLOW-UP ACTION BUTTONS
   (Suggested actions inside an AI message, distinct from sticky suggestion chips)
   ========================================================================= */
.msg-followups {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0;
}
.followup-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  background: rgba(8, 32, 42, 0.6);
  color: var(--ink-primary);
  font-family: "Oxanium", sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}
.followup-btn:hover {
  border-color: #5DD5D5;
  background: rgba(93, 213, 213, 0.08);
  transform: translateY(-1px);
}
.followup-btn i { font-size: 14px; color: #5DD5D5; }
.followup-primary {
  border-color: #5DD5D5;
  background: linear-gradient(135deg, rgba(93, 213, 213, 0.18) 0%, rgba(61, 143, 160, 0.12) 100%);
  color: #FFFFFF;
}
.followup-primary i { color: #5DD5D5; }
.followup-primary:hover {
  background: linear-gradient(135deg, rgba(93, 213, 213, 0.3) 0%, rgba(61, 143, 160, 0.2) 100%);
}

/* =========================================================================
   THINKING / STREAMING STATE
   ========================================================================= */
.thinking-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 14px 14px 14px 4px;
  background: rgba(8, 32, 42, 0.6);
  border: 1px solid var(--border-soft);
  font-family: "Oxanium", sans-serif;
  font-size: 12.5px;
  color: var(--ink-secondary);
}
.think-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5DD5D5;
  animation: think-pulse 1.2s ease-in-out infinite;
}
.think-dot:nth-child(2) { animation-delay: 0.2s; }
.think-dot:nth-child(3) { animation-delay: 0.4s; }
.think-label { margin-left: 4px; }

@keyframes think-pulse {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1); }
}

/* =========================================================================
   SUGGESTED FOLLOW-UPS (end-of-thread chips)
   ========================================================================= */
.suggested {
  margin: 12px 0 8px;
  padding: 16px 0 8px;
  border-top: 1px solid var(--border-soft);
}
.suggested-label {
  font-family: "Oxanium", sans-serif;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-tertiary);
  margin-bottom: 10px;
}
.suggested-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sugg-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: rgba(8, 32, 42, 0.5);
  color: var(--ink-primary);
  font-family: "Oxanium", sans-serif;
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}
.sugg-chip:hover {
  border-color: #5DD5D5;
  background: rgba(93, 213, 213, 0.08);
  transform: translateY(-1px);
}
.sugg-chip i { font-size: 13px; color: #5DD5D5; }

/* =========================================================================
   COMPOSER
   ========================================================================= */
.composer {
  padding: 12px 32px 20px;
  background: rgba(8, 32, 42, 0.7);
  border-top: 1px solid var(--border-soft);
  backdrop-filter: saturate(140%) blur(8px);
}
.composer-scope-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  padding: 0 4px;
}
.composer-scope {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "Oxanium", sans-serif;
  font-size: 11.5px;
  color: var(--ink-secondary);
}
.composer-scope i { color: #A8D68E; font-size: 13px; }
.composer-scope strong { color: #A8D68E; font-weight: 600; }
.scope-change {
  background: none;
  border: none;
  padding: 0 0 0 4px;
  color: #5DD5D5;
  font-family: "Oxanium", sans-serif;
  font-size: 11.5px;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(93, 213, 213, 0.4);
  text-underline-offset: 3px;
}
.scope-change:hover { color: #FFFFFF; text-decoration-color: #FFFFFF; }

.composer-hint {
  font-family: "Oxanium", sans-serif;
  font-size: 10.5px;
  color: var(--ink-tertiary);
}
.composer-hint kbd {
  display: inline-block;
  font-family: "Electrolize", monospace;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(127, 196, 207, 0.12);
  border: 1px solid var(--border-soft);
  color: var(--ink-secondary);
  margin: 0 1px;
}

.composer-input-wrap {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 14px;
  border: 1px solid var(--border-soft);
  background: rgba(8, 32, 42, 0.8);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.composer-input-wrap:focus-within {
  border-color: #5DD5D5;
  box-shadow: 0 0 0 3px rgba(93, 213, 213, 0.12);
}

.composer-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--ink-secondary);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
  flex-shrink: 0;
}
.composer-btn:hover {
  background: rgba(127, 196, 207, 0.08);
  color: var(--ink-primary);
}
.composer-btn i { font-size: 17px; }

.composer-input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--ink-primary);
  font-family: "Oxanium", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  padding: 8px 4px;
  resize: none;
  outline: none;
  max-height: 200px;
  overflow-y: auto;
}
.composer-input::placeholder { color: var(--ink-tertiary); }

.composer-send {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: none;
  background: linear-gradient(135deg, #5DD5D5 0%, #3D8FA0 100%);
  color: #0B2028;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 120ms ease, box-shadow 120ms ease;
  box-shadow: 0 2px 8px rgba(93, 213, 213, 0.25);
}
.composer-send:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(93, 213, 213, 0.4);
}
.composer-send i { font-size: 18px; }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 900px) {
  .chat-shell { grid-template-columns: 1fr; }
  .chat-rail { display: none; }
  .thread-head { padding: 16px 20px; }
  .thread-scroll { padding: 20px 20px 12px; }
  .composer { padding: 12px 20px 16px; }
}
