/* Flowtide Ambra skin — scoped for @neo/chat */

/* ============================================================
   Flowtide Chat — Design reference
   Palette: Ambra (deep aubergine + warm copper)
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400..700&family=Instrument+Sans:ital,wght@0,400..700;1,400..700&family=JetBrains+Mono:wght@400;500&display=swap");

/* ---------- Palette override (Ambra) ---------- */
.neo-chat--flowtide {
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Instrument Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --paper: #F7F2EC;
  --text: #F5EDE4;
  --ink:          #1A1018;
  --ink-2:        #241823;
  --ink-3:        #2E2030;
  --accent:       #D49558;
  --accent-deep:  #A86B30;
  --accent-soft:  rgba(212, 149, 88, 0.13);
  --text-inv:     #F5EDE4;
  --text-inv-2:   #C9BFB8;
  --text-inv-3:   #847872;
  --ink-soft:     rgba(60, 50, 40, 0.65);
  --line-dark:    rgba(255, 240, 220, 0.08);
  --line-dark-2:  rgba(255, 240, 220, 0.18);
  color: var(--text-inv);
  font-family: var(--font-body);
}

/*
 * Combinable theming:
 * - data-neo-mode="dark|light" → shell (dark Ambra vs paper)
 * - data-neo-accent="ambra|ocean|..." → accent colors
 * Legacy data-neo-theme kept as alias for accents + "light" mode.
 */
.neo-chat--flowtide[data-neo-accent="ambra"],
.neo-chat--flowtide[data-neo-theme="ambra"],
[data-neo-accent="ambra"] .neo-chat--flowtide,
[data-neo-theme="ambra"] .neo-chat--flowtide {
  --accent: #D49558;
  --accent-deep: #A86B30;
  --accent-soft: rgba(212, 149, 88, 0.13);
}
.neo-chat--flowtide[data-neo-accent="ocean"],
.neo-chat--flowtide[data-neo-theme="ocean"],
[data-neo-accent="ocean"] .neo-chat--flowtide,
[data-neo-theme="ocean"] .neo-chat--flowtide {
  --accent: #5B9FD4;
  --accent-deep: #2F6F9E;
  --accent-soft: rgba(91, 159, 212, 0.14);
}
.neo-chat--flowtide[data-neo-accent="forest"],
.neo-chat--flowtide[data-neo-theme="forest"],
[data-neo-accent="forest"] .neo-chat--flowtide,
[data-neo-theme="forest"] .neo-chat--flowtide {
  --accent: #6FAF7A;
  --accent-deep: #3E7A4A;
  --accent-soft: rgba(111, 175, 122, 0.14);
}
.neo-chat--flowtide[data-neo-accent="violet"],
.neo-chat--flowtide[data-neo-theme="violet"],
[data-neo-accent="violet"] .neo-chat--flowtide,
[data-neo-theme="violet"] .neo-chat--flowtide {
  --accent: #A78BDA;
  --accent-deep: #6E4FA8;
  --accent-soft: rgba(167, 139, 218, 0.15);
}
.neo-chat--flowtide[data-neo-accent="rose"],
.neo-chat--flowtide[data-neo-theme="rose"],
[data-neo-accent="rose"] .neo-chat--flowtide,
[data-neo-theme="rose"] .neo-chat--flowtide {
  --accent: #D47A8C;
  --accent-deep: #A0455A;
  --accent-soft: rgba(212, 122, 140, 0.14);
}
.neo-chat--flowtide[data-neo-accent="slate"],
.neo-chat--flowtide[data-neo-theme="slate"],
[data-neo-accent="slate"] .neo-chat--flowtide,
[data-neo-theme="slate"] .neo-chat--flowtide {
  --accent: #8A9BB0;
  --accent-deep: #556578;
  --accent-soft: rgba(138, 155, 176, 0.16);
}

/* Flowtide Light shell — combine with any data-neo-accent */
.neo-chat--flowtide[data-neo-mode="light"],
.neo-chat--flowtide[data-neo-theme="light"],
[data-neo-mode="light"] .neo-chat--flowtide,
[data-neo-theme="light"] .neo-chat--flowtide {
  --text-inv: #1A1018;
  --text-inv-2: #4A3F45;
  --text-inv-3: #847872;
  --line-dark: rgba(26, 16, 24, 0.08);
  --line-dark-2: rgba(26, 16, 24, 0.14);
  --ink-soft: rgba(60, 50, 40, 0.55);
  color: var(--text-inv);
}
.neo-chat--flowtide[data-neo-mode="light"] .chat,
.neo-chat--flowtide[data-neo-theme="light"] .chat,
[data-neo-mode="light"] .neo-chat--flowtide .chat,
[data-neo-theme="light"] .neo-chat--flowtide .chat {
  background: linear-gradient(180deg, #FFFCFA 0%, #F7F2EC 100%);
  border: 1px solid rgba(26, 16, 24, 0.12);
  box-shadow:
    0 28px 70px -36px rgba(26, 16, 24, 0.28),
    0 1px 0 0 rgba(255, 255, 255, 0.7) inset;
}
.neo-chat--flowtide[data-neo-mode="light"] .chat__head,
.neo-chat--flowtide[data-neo-theme="light"] .chat__head,
[data-neo-mode="light"] .neo-chat--flowtide .chat__head,
[data-neo-theme="light"] .neo-chat--flowtide .chat__head {
  background: rgba(255, 255, 255, 0.55);
  border-bottom-color: rgba(26, 16, 24, 0.08);
}
.neo-chat--flowtide[data-neo-mode="light"] .chat__avatar,
.neo-chat--flowtide[data-neo-theme="light"] .chat__avatar,
[data-neo-mode="light"] .neo-chat--flowtide .chat__avatar,
[data-neo-theme="light"] .neo-chat--flowtide .chat__avatar {
  color: #F7F2EC;
}
.neo-chat--flowtide[data-neo-mode="light"] .chat__ai-notice,
.neo-chat--flowtide[data-neo-theme="light"] .chat__ai-notice,
[data-neo-mode="light"] .neo-chat--flowtide .chat__ai-notice,
[data-neo-theme="light"] .neo-chat--flowtide .chat__ai-notice {
  background: var(--accent-soft);
  border-bottom-color: rgba(26, 16, 24, 0.08);
}
.neo-chat--flowtide[data-neo-mode="light"] .chat__input-wrap,
.neo-chat--flowtide[data-neo-theme="light"] .chat__input-wrap,
[data-neo-mode="light"] .neo-chat--flowtide .chat__input-wrap,
[data-neo-theme="light"] .neo-chat--flowtide .chat__input-wrap {
  background: rgba(255, 255, 255, 0.65);
  border-top-color: rgba(26, 16, 24, 0.08);
}
.neo-chat--flowtide[data-neo-mode="light"] .chat__input input,
.neo-chat--flowtide[data-neo-theme="light"] .chat__input input,
[data-neo-mode="light"] .neo-chat--flowtide .chat__input input,
[data-neo-theme="light"] .neo-chat--flowtide .chat__input input {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(26, 16, 24, 0.12);
  color: #1A1018;
}
.neo-chat--flowtide[data-neo-mode="light"] .chat__input-icon,
.neo-chat--flowtide[data-neo-theme="light"] .chat__input-icon,
[data-neo-mode="light"] .neo-chat--flowtide .chat__input-icon,
[data-neo-theme="light"] .neo-chat--flowtide .chat__input-icon {
  background: rgba(26, 16, 24, 0.04);
}
.neo-chat--flowtide[data-neo-mode="light"] .cmsg--ai .cmsg__bubble,
.neo-chat--flowtide[data-neo-theme="light"] .cmsg--ai .cmsg__bubble,
[data-neo-mode="light"] .neo-chat--flowtide .cmsg--ai .cmsg__bubble,
[data-neo-theme="light"] .neo-chat--flowtide .cmsg--ai .cmsg__bubble {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(26, 16, 24, 0.1);
  color: #1A1018;
}
.neo-chat--flowtide[data-neo-mode="light"] .cmsg--user .cmsg__bubble,
.neo-chat--flowtide[data-neo-theme="light"] .cmsg--user .cmsg__bubble,
[data-neo-mode="light"] .neo-chat--flowtide .cmsg--user .cmsg__bubble,
[data-neo-theme="light"] .neo-chat--flowtide .cmsg--user .cmsg__bubble {
  background: var(--accent-deep);
  color: #F7F2EC;
}
.neo-chat--flowtide[data-neo-mode="light"] .nc-md-code-inline,
.neo-chat--flowtide[data-neo-theme="light"] .nc-md-code-inline,
[data-neo-mode="light"] .neo-chat--flowtide .nc-md-code-inline,
[data-neo-theme="light"] .neo-chat--flowtide .nc-md-code-inline {
  background: rgba(26, 16, 24, 0.06);
  color: var(--accent-deep);
}
.neo-chat--flowtide[data-neo-mode="light"] .cmsg__code,
.neo-chat--flowtide[data-neo-theme="light"] .cmsg__code,
[data-neo-mode="light"] .neo-chat--flowtide .cmsg__code,
[data-neo-theme="light"] .neo-chat--flowtide .cmsg__code {
  background: rgba(26, 16, 24, 0.04);
  border-color: rgba(26, 16, 24, 0.1);
}
.neo-chat--flowtide[data-neo-mode="light"] .cmsg__code-head,
.neo-chat--flowtide[data-neo-theme="light"] .cmsg__code-head,
[data-neo-mode="light"] .neo-chat--flowtide .cmsg__code-head,
[data-neo-theme="light"] .neo-chat--flowtide .cmsg__code-head {
  background: rgba(26, 16, 24, 0.03);
  border-bottom-color: rgba(26, 16, 24, 0.08);
}
.neo-chat--flowtide[data-neo-mode="light"] .cmsg__code pre,
.neo-chat--flowtide[data-neo-theme="light"] .cmsg__code pre,
[data-neo-mode="light"] .neo-chat--flowtide .cmsg__code pre,
[data-neo-theme="light"] .neo-chat--flowtide .cmsg__code pre {
  color: #1A1018;
}
.neo-chat--flowtide[data-neo-mode="light"] .cmsg__quick button,
.neo-chat--flowtide[data-neo-theme="light"] .cmsg__quick button,
[data-neo-mode="light"] .neo-chat--flowtide .cmsg__quick button,
[data-neo-theme="light"] .neo-chat--flowtide .cmsg__quick button {
  background: var(--accent-soft);
  color: var(--accent-deep);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}
.neo-chat--flowtide[data-neo-mode="light"] .cmsg__source,
.neo-chat--flowtide[data-neo-theme="light"] .cmsg__source,
[data-neo-mode="light"] .neo-chat--flowtide .cmsg__source,
[data-neo-theme="light"] .neo-chat--flowtide .cmsg__source {
  background: var(--accent-soft);
  color: var(--accent-deep);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}
.neo-chat--flowtide[data-neo-mode="light"] .chat__staged-attach,
.neo-chat--flowtide[data-neo-theme="light"] .chat__staged-attach,
[data-neo-mode="light"] .neo-chat--flowtide .chat__staged-attach,
[data-neo-theme="light"] .neo-chat--flowtide .chat__staged-attach {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
}
.neo-chat--flowtide[data-neo-mode="light"] .nc-source__box,
.neo-chat--flowtide[data-neo-theme="light"] .nc-source__box,
[data-neo-mode="light"] .neo-chat--flowtide .nc-source__box,
[data-neo-theme="light"] .neo-chat--flowtide .nc-source__box {
  background: #fff;
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}
.neo-chat--flowtide[data-neo-mode="light"] .chat__intent-status,
.neo-chat--flowtide[data-neo-theme="light"] .chat__intent-status,
[data-neo-mode="light"] .neo-chat--flowtide .chat__intent-status,
[data-neo-theme="light"] .neo-chat--flowtide .chat__intent-status {
  border-bottom-color: rgba(26, 16, 24, 0.08);
}

.neo-chat--flowtide ::selection { background: rgba(212, 149, 88, 0.28); color: var(--text); }

.neo-chat--flowtide .chat-stage {
  background: var(--paper);
  padding-bottom: clamp(80px, 10vw, 140px);
  padding-top: 0;
  position: relative;
}
.neo-chat--flowtide .chat-stage::before {
  content: "";
  position: absolute;
  inset: 60px 0 0 0;
  background:
    radial-gradient(50% 40% at 50% 20%, rgba(212, 149, 88, 0.10), transparent 60%);
  pointer-events: none;
}

/* ---------- Chat container ---------- */
.neo-chat--flowtide .chat {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(36, 24, 35, 0.96), rgba(26, 16, 24, 0.96));
  border: 1px solid var(--line-dark-2);
  border-radius: 28px;
  overflow: hidden;
  box-shadow:
    0 40px 100px -40px rgba(20, 10, 18, 0.5),
    0 1px 0 0 rgba(255,255,255,0.04) inset;
}

.neo-chat--flowtide .chat__head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line-dark);
  background: rgba(0,0,0,0.18);
}
.neo-chat--flowtide .chat__avatar {
  width: 36px; height: 36px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
  color: var(--paper);
  letter-spacing: -0.02em;
}
.neo-chat--flowtide .chat__id { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.neo-chat--flowtide .chat__name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15px;
  color: var(--text-inv);
  letter-spacing: -0.01em;
}
.neo-chat--flowtide .chat__org {
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-inv-2);
  letter-spacing: -0.01em;
}
.neo-chat--flowtide .chat__status {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-inv-3);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.neo-chat--flowtide .chat__status::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 999px;
  background: #9FCC85;
  box-shadow: 0 0 0 2px rgba(159, 204, 133, 0.22);
}

.neo-chat--flowtide .chat__ai-notice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 22px;
  border-bottom: 1px solid var(--line-dark);
  background: rgba(0, 0, 0, 0.12);
  font-family: var(--font-body);
  font-size: 12px;
  color: var(--text-inv-3);
}

.neo-chat--flowtide .chat__ai-notice-icon {
  flex-shrink: 0;
  font-size: 13px;
  color: var(--accent);
}

.neo-chat--flowtide .chat__ai-disclaimer {
  margin: 0;
  padding: 8px 22px 14px;
  font-family: var(--font-body);
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-inv-3);
  text-align: center;
}

.neo-chat--flowtide .chat__menu {
  width: 30px; height: 30px;
  border-radius: 999px;
  background: rgba(255,250,235,0.05);
  display: grid; place-items: center;
  color: var(--text-inv-3);
  transition: background var(--dur-1) var(--ease);
  cursor: pointer;
}
.neo-chat--flowtide .chat__menu:hover { background: rgba(255,250,235,0.10); color: var(--text-inv-2); }

.neo-chat--flowtide .chat__body {
  padding: 26px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.neo-chat--flowtide .chat__input-wrap {
  border-top: 1px solid var(--line-dark);
  background: rgba(0,0,0,0.20);
}

.neo-chat--flowtide .chat__staged-attach {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  margin: 0 16px 8px;
  border: 1px dashed rgba(212, 149, 88, 0.45);
  border-radius: 10px;
  background: rgba(212, 149, 88, 0.08);
  font-size: 13px;
  color: var(--text-inv-2);
}

.neo-chat--flowtide .chat__staged-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.neo-chat--flowtide .chat__staged-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(0,0,0,0.25);
}

.neo-chat--flowtide .chat__staged-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.neo-chat--flowtide .chat__staged-icon {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: rgba(255,250,235,0.08);
  color: var(--accent);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 18px;
}

.neo-chat--flowtide .chat__staged-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.neo-chat--flowtide .chat__staged-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
  color: var(--text-inv);
}

.neo-chat--flowtide .chat__staged-meta {
  font-size: 12px;
  color: var(--text-inv-3);
}

.neo-chat--flowtide .chat__staged-hint {
  font-size: 12px;
  color: var(--accent);
}

.neo-chat--flowtide .chat__staged-remove {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: var(--text-inv-3);
  font-size: 12px;
  cursor: pointer;
}

.neo-chat--flowtide .chat__staged-remove:hover {
  color: var(--text-inv-2);
}

.neo-chat--flowtide .chat__input {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 14px 16px;
  border-top: none;
  background: transparent;
}
.neo-chat--flowtide .chat__input input {
  flex: 1;
  background: rgba(255,250,235,0.04);
  border: 1px solid var(--line-dark);
  padding: 12px 16px;
  border-radius: 999px;
  color: var(--text-inv);
  font-size: 14px;
  outline: none;
  transition: border-color var(--dur-1) var(--ease);
}
.neo-chat--flowtide .chat__input input:focus { border-color: var(--accent); }
.neo-chat--flowtide .chat__input input::placeholder { color: var(--text-inv-3); }
.neo-chat--flowtide .chat__input-icon {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(255,250,235,0.04);
  color: var(--text-inv-3);
  display: grid; place-items: center;
  transition: background var(--dur-1) var(--ease);
  cursor: pointer;
}
.neo-chat--flowtide .chat__input-icon:hover { background: rgba(255,250,235,0.08); color: var(--text-inv-2); }
.neo-chat--flowtide .chat__send {
  width: 40px; height: 40px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink);
  display: grid; place-items: center;
  transition: background var(--dur-1) var(--ease);
  cursor: pointer;
}
.neo-chat--flowtide .chat__send:hover { background: #E6AC6F; }

/* ============================================================
   Messages
   ============================================================ */

.neo-chat--flowtide .cmsg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.neo-chat--flowtide .cmsg--user { justify-content: flex-end; }
.neo-chat--flowtide .cmsg__avatar {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 11px;
  color: var(--paper);
  flex-shrink: 0;
  letter-spacing: -0.01em;
}
.neo-chat--flowtide .cmsg--user .cmsg__avatar { display: none; }
.neo-chat--flowtide .cmsg__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 78%;
  min-width: 0;
}
.neo-chat--flowtide .cmsg--user .cmsg__body { align-items: flex-end; }
.neo-chat--flowtide .cmsg__variant {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.neo-chat--flowtide .cmsg__variant::before {
  content: "";
  display: inline-block;
  width: 10px; height: 1px;
  background: var(--accent);
}
.neo-chat--flowtide .cmsg__bubble {
  padding: 12px 15px;
  border-radius: 16px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text-inv);
  text-wrap: pretty;
}
.neo-chat--flowtide .cmsg--ai .cmsg__bubble {
  background: rgba(255,250,235,0.05);
  border: 1px solid var(--line-dark);
  border-bottom-left-radius: 6px;
}
.neo-chat--flowtide .cmsg--user .cmsg__bubble {
  background: var(--accent-deep);
  color: var(--paper);
  border-bottom-right-radius: 6px;
}
.neo-chat--flowtide .cmsg__bubble strong { color: var(--accent); font-weight: 600; }
.neo-chat--flowtide .cmsg--user .cmsg__bubble strong { color: var(--paper); }
.neo-chat--flowtide .cmsg__time {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-inv-3);
  padding: 0 4px;
}

/* ---------- Markdown (nc-md-*) on dark bubbles ---------- */
.neo-chat--flowtide .nc-md-p {
  margin: 0 0 8px;
  color: var(--text-inv);
}
.neo-chat--flowtide .nc-md-p:last-child { margin-bottom: 0; }
.neo-chat--flowtide .nc-md-ul,
.neo-chat--flowtide .nc-md-ol {
  margin: 0 0 8px;
  padding-left: 1.25rem;
  color: var(--text-inv);
}
.neo-chat--flowtide .nc-md-ul { list-style: disc; }
.neo-chat--flowtide .nc-md-ol { list-style: decimal; }
.neo-chat--flowtide .nc-md-strong { color: var(--accent); font-weight: 600; }
.neo-chat--flowtide .cmsg--user .nc-md-strong { color: var(--paper); }
.neo-chat--flowtide .nc-md-link {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.neo-chat--flowtide .cmsg--user .nc-md-link { color: var(--paper); }
.neo-chat--flowtide .nc-md-h1,
.neo-chat--flowtide .nc-md-h2,
.neo-chat--flowtide .nc-md-h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--text-inv);
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.neo-chat--flowtide .nc-md-h1 { font-size: 1.2em; }
.neo-chat--flowtide .nc-md-h2 { font-size: 1.1em; }
.neo-chat--flowtide .nc-md-h3 { font-size: 1.05em; }
.neo-chat--flowtide .nc-md-quote {
  margin: 0 0 8px;
  padding: 8px 12px;
  border-left: 3px solid var(--accent);
  background: rgba(212, 149, 88, 0.08);
  color: var(--text-inv-2);
  border-radius: 0 8px 8px 0;
}
.neo-chat--flowtide .nc-md-hr {
  margin: 12px 0;
  border: 0;
  border-top: 1px solid var(--line-dark-2);
}
.neo-chat--flowtide .nc-md-code-inline {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: rgba(0, 0, 0, 0.35);
  color: #F1C690;
  padding: 1px 5px;
  border-radius: 5px;
}
.neo-chat--flowtide .cmsg--user .nc-md-code-inline {
  background: rgba(0, 0, 0, 0.2);
  color: var(--paper);
}

/* Inline citation chips */
.neo-chat--flowtide .cmsg__cite {
  display: inline-flex;
  align-items: center; justify-content: center;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  margin: 0 2px;
  border-radius: 5px;
  background: var(--accent);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  vertical-align: 1px;
  cursor: default;
  transition: transform var(--dur-1) var(--ease);
}
.neo-chat--flowtide .cmsg__cite:hover { transform: translateY(-1px); }

/* Source pills row */
.neo-chat--flowtide .cmsg__sources {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 4px;
}
.neo-chat--flowtide .cmsg__source {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(212, 149, 88, 0.14);
  color: #F1C690;
  border: 1px solid rgba(212, 149, 88, 0.3);
  display: inline-flex; align-items: center; gap: 6px;
  cursor: pointer;
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.neo-chat--flowtide .cmsg__source:hover { background: rgba(212, 149, 88, 0.22); border-color: rgba(212, 149, 88, 0.5); }
.neo-chat--flowtide .cmsg__source svg { flex-shrink: 0; }

/* Expandable source citation boxes (light cards on dark stage) */
.neo-chat--flowtide .nc-widget--sources .nc-widget-label {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-inv-3);
}
.neo-chat--flowtide .nc-source-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.neo-chat--flowtide .nc-source__box {
  border: 1px solid rgba(212, 149, 88, 0.3);
  border-radius: 12px;
  background: rgba(255, 250, 235, 0.92);
  color: var(--ink);
  overflow: hidden;
}
.neo-chat--flowtide .nc-source__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  cursor: pointer;
  font-size: 13px;
  list-style: none;
  color: var(--ink);
}
.neo-chat--flowtide .nc-source__summary::-webkit-details-marker { display: none; }
.neo-chat--flowtide .nc-source__title { font-weight: 600; color: var(--ink); }
.neo-chat--flowtide .nc-source__title a { color: var(--accent-deep); text-decoration: none; }
.neo-chat--flowtide .nc-source__count {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  white-space: nowrap;
}
.neo-chat--flowtide .nc-source__excerpts {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 12px 12px;
}
.neo-chat--flowtide .nc-source__excerpt { margin: 0; }
.neo-chat--flowtide .nc-source__excerpt-meta {
  font-size: 10.5px;
  color: var(--ink-soft);
  margin-bottom: 3px;
}
.neo-chat--flowtide .nc-source__excerpt-text {
  margin: 0;
  padding: 9px 11px;
  border-left: 3px solid rgba(212, 149, 88, 0.6);
  background: rgba(212, 149, 88, 0.12);
  border-radius: 6px;
  font-size: 12.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  color: var(--ink);
}
.neo-chat--flowtide .nc-source__section,
.neo-chat--flowtide .nc-source__snippet {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--ink-soft);
}

/* ---------- Typing indicator ---------- */
.neo-chat--flowtide .cmsg--typing .cmsg__bubble {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 14px 16px;
}
.neo-chat--flowtide .cmsg--typing .cmsg__dot {
  width: 6px; height: 6px;
  border-radius: 999px;
  background: var(--text-inv-3);
  animation: chat-typing 1.2s ease-in-out infinite;
}
.neo-chat--flowtide .cmsg--typing .cmsg__dot:nth-child(2) { animation-delay: 0.15s; }
.neo-chat--flowtide .cmsg--typing .cmsg__dot:nth-child(3) { animation-delay: 0.3s; }
@keyframes chat-typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-3px); opacity: 1; }
}

/* ---------- Quick replies ---------- */
.neo-chat--flowtide .cmsg__quick {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.neo-chat--flowtide .cmsg__quick button {
  padding: 9px 14px;
  border-radius: 999px;
  background: rgba(212, 149, 88, 0.10);
  color: #F1C690;
  border: 1px solid rgba(212, 149, 88, 0.3);
  font-size: 13px;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.neo-chat--flowtide .cmsg__quick button:hover {
  background: rgba(212, 149, 88, 0.22);
  border-color: rgba(212, 149, 88, 0.5);
  transform: translateY(-1px);
}

/* ---------- Code block ---------- */
.neo-chat--flowtide .cmsg__code {
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--line-dark);
  border-radius: 14px;
  overflow: hidden;
  width: 100%;
  max-width: 460px;
}
.neo-chat--flowtide .cmsg__code-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line-dark);
  background: rgba(0,0,0,0.25);
}
.neo-chat--flowtide .cmsg__code-head span {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-inv-3);
}
.neo-chat--flowtide .cmsg__code-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-inv-2);
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.neo-chat--flowtide .cmsg__code-copy:hover { background: rgba(255,250,235,0.06); color: var(--accent); }
.neo-chat--flowtide .cmsg__code-copy.copied { color: #9FCC85; }
.neo-chat--flowtide .cmsg__code pre {
  margin: 0;
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--text-inv);
  overflow-x: auto;
  white-space: pre;
}
.neo-chat--flowtide .cmsg__code .tok-key { color: var(--accent); }
.neo-chat--flowtide .cmsg__code .tok-str { color: #C8D8B0; }
.neo-chat--flowtide .cmsg__code .tok-com { color: var(--text-inv-3); }
.neo-chat--flowtide .cmsg__code .tok-num { color: #E5C887; }
.neo-chat--flowtide .cmsg__code .tok-fn  { color: #F1C690; }

/* ---------- PDF attachment ---------- */
.neo-chat--flowtide .cmsg__attach {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255,250,235,0.05);
  border: 1px solid var(--line-dark);
  border-radius: 14px;
  width: 100%;
  max-width: 380px;
  text-decoration: none;
  color: var(--text-inv);
}
.neo-chat--flowtide .cmsg__attach-thumb {
  width: 56px;
  height: 56px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: rgba(255, 250, 235, 0.06);
}
.neo-chat--flowtide .cmsg__attach-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.neo-chat--flowtide .cmsg__attach-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: rgba(212, 149, 88, 0.16);
  color: var(--accent);
  display: grid; place-items: center;
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.neo-chat--flowtide .cmsg__attach-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.neo-chat--flowtide .cmsg__attach-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  color: var(--text-inv);
  letter-spacing: -0.005em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.neo-chat--flowtide .cmsg__attach-meta {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-inv-3);
}
.neo-chat--flowtide .cmsg__attach-btn {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--ink);
  display: grid; place-items: center;
  transition: background var(--dur-1) var(--ease);
  cursor: pointer;
  flex-shrink: 0;
}
.neo-chat--flowtide .cmsg__attach-btn:hover { background: #E6AC6F; }

/* ---------- Image card ---------- */
.neo-chat--flowtide .cmsg__image {
  width: 100%;
  max-width: 400px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line-dark);
  background: var(--ink-2);
}
.neo-chat--flowtide .cmsg__image img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16/10;
  object-fit: cover;
}
.neo-chat--flowtide .cmsg__image-caption {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-inv-3);
  border-top: 1px solid var(--line-dark);
}

/* ---------- Link card ---------- */
.neo-chat--flowtide .cmsg__link {
  width: 100%;
  max-width: 420px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--line-dark);
  background: rgba(255,250,235,0.04);
  display: block;
  text-decoration: none;
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease);
}
.neo-chat--flowtide .cmsg__link:hover {
  background: rgba(212, 149, 88, 0.08);
  border-color: rgba(212, 149, 88, 0.4);
}
.neo-chat--flowtide .cmsg__link-strip {
  height: 6px;
  background: linear-gradient(90deg, var(--accent), var(--accent-deep));
}
.neo-chat--flowtide .cmsg__link-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.neo-chat--flowtide .cmsg__link-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-inv-3);
}
.neo-chat--flowtide .cmsg__link-meta svg { color: var(--accent); }
.neo-chat--flowtide .cmsg__link-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: -0.02em;
  color: var(--text-inv);
  margin: 2px 0;
}
.neo-chat--flowtide .cmsg__link-desc {
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-inv-2);
}

/* ---------- Calendar slots ---------- */
.neo-chat--flowtide .cmsg__slots {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  max-width: 460px;
}
.neo-chat--flowtide .cmsg__slot {
  flex: 1 1 130px;
  min-width: 120px;
  padding: 12px 14px;
  background: rgba(255,250,235,0.04);
  border: 1px solid var(--line-dark);
  border-radius: 12px;
  cursor: pointer;
  text-align: left;
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), transform var(--dur-1) var(--ease);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.neo-chat--flowtide .cmsg__slot:hover {
  background: rgba(212, 149, 88, 0.10);
  border-color: rgba(212, 149, 88, 0.4);
  transform: translateY(-1px);
}
.neo-chat--flowtide .cmsg__slot-day {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-inv-3);
}
.neo-chat--flowtide .cmsg__slot-time {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 16px;
  color: var(--text-inv);
  letter-spacing: -0.02em;
}

/* ---------- Info card (confirmation) ---------- */
.neo-chat--flowtide .cmsg__card {
  width: 100%;
  max-width: 420px;
  background: rgba(212, 149, 88, 0.08);
  border: 1px solid rgba(212, 149, 88, 0.30);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.neo-chat--flowtide .cmsg__card-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(212, 149, 88, 0.20);
}
.neo-chat--flowtide .cmsg__card-head svg { flex-shrink: 0; }
.neo-chat--flowtide .cmsg__card-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 12px;
  font-size: 13.5px;
}
.neo-chat--flowtide .cmsg__card-row dt {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-inv-3);
  margin: 0;
  padding-top: 2px;
}
.neo-chat--flowtide .cmsg__card-row dd {
  margin: 0;
  color: var(--text-inv);
  font-weight: 500;
}

/* ---------- Handoff card ---------- */
.neo-chat--flowtide .cmsg__handoff {
  width: 100%;
  max-width: 420px;
  background: rgba(255,250,235,0.05);
  border: 1px solid var(--line-dark-2);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.neo-chat--flowtide .cmsg__handoff-avatar {
  width: 44px; height: 44px;
  border-radius: 999px;
  background: linear-gradient(135deg, #9FCC85, #5A8C46);
  color: var(--paper);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.02em;
  position: relative;
}
.neo-chat--flowtide .cmsg__handoff-avatar::after {
  content: "";
  position: absolute;
  bottom: -2px; right: -2px;
  width: 12px; height: 12px;
  border-radius: 999px;
  background: #9FCC85;
  border: 2px solid var(--ink);
}
.neo-chat--flowtide .cmsg__handoff-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.neo-chat--flowtide .cmsg__handoff-name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15px;
  color: var(--text-inv);
}
.neo-chat--flowtide .cmsg__handoff-role {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-inv-3);
}
.neo-chat--flowtide .cmsg__handoff-btn {
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--dur-1) var(--ease);
  display: inline-flex;
  gap: 6px;
  align-items: center;
}
.neo-chat--flowtide .cmsg__handoff-btn:hover { background: #E6AC6F; }

/* ---------- Feedback row ---------- */
.neo-chat--flowtide .cmsg__feedback {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  background: rgba(255,250,235,0.03);
  border: 1px solid var(--line-dark);
  border-radius: 999px;
}
.neo-chat--flowtide .cmsg__feedback button {
  width: 28px; height: 28px;
  border-radius: 999px;
  background: transparent;
  color: var(--text-inv-3);
  display: grid; place-items: center;
  cursor: pointer;
  transition: background var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}
.neo-chat--flowtide .cmsg__feedback button:hover { background: rgba(255,250,235,0.06); color: var(--text-inv-2); }
.neo-chat--flowtide .cmsg__feedback button.active { color: var(--accent); }

/* ---------- User file upload ---------- */
.neo-chat--flowtide .cmsg--user .cmsg__attach {
  background: rgba(168, 107, 48, 0.20);
  border-color: rgba(168, 107, 48, 0.45);
}
.neo-chat--flowtide .cmsg--user .cmsg__attach-icon {
  background: rgba(255, 240, 220, 0.18);
  color: var(--paper);
}
.neo-chat--flowtide .cmsg--user .cmsg__attach-name { color: var(--paper); }
.neo-chat--flowtide .cmsg--user .cmsg__attach-meta { color: rgba(255, 240, 220, 0.6); }

/* ---------- System separator ---------- */
.neo-chat--flowtide .cmsg--system {
  align-self: center;
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  max-width: 360px;
  margin: 4px auto;
}
.neo-chat--flowtide .cmsg--system::before,
.neo-chat--flowtide .cmsg--system::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-dark);
}
.neo-chat--flowtide .cmsg--system span {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-inv-3);
}

/* ---------- Spec footer ---------- */
.neo-chat--flowtide .spec-foot {
  background: var(--paper-2);
  padding-block: clamp(56px, 7vw, 96px);
  border-top: 1px solid var(--line);
}
.neo-chat--flowtide .spec-foot__inner {
  max-width: 760px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.neo-chat--flowtide .spec-foot h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(24px, 2.6vw, 32px);
  letter-spacing: -0.03em;
  margin: 0;
  color: var(--text);
}
.neo-chat--flowtide .spec-foot__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--paper-3);
  border: 1px solid var(--paper-3);
  border-radius: var(--radius);
  overflow: hidden;
}
@media (min-width: 700px) { .spec-foot__list { grid-template-columns: 1fr 1fr; } }
.neo-chat--flowtide .spec-foot__row {
  background: var(--paper);
  padding: 14px 18px;
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 14px;
  align-items: baseline;
  font-size: 13.5px;
  line-height: 1.45;
}
.neo-chat--flowtide .spec-foot__row strong {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-deep);
  font-weight: 500;
}
.neo-chat--flowtide .spec-foot__row span { color: var(--text-2); }
.neo-chat--flowtide .spec-foot__row code {
  font-family: var(--font-mono);
  background: var(--paper-2);
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 12px;
  color: var(--text);
}

.neo-chat--flowtide .chat__empty {
  text-align: center;
  color: var(--text-inv-3);
  font-size: 14px;
  margin: 24px 0;
}

.neo-chat--flowtide .chat__error {
  margin: 0;
  padding: 8px 22px 14px;
  color: #f0a8a8;
  font-size: 13px;
}

.neo-chat--flowtide .chat__intents {
  padding: 0 22px 12px;
}

.neo-chat--flowtide .cmsg__quick button.is-active {
  background: var(--accent, #6366f1);
  color: #fff;
}

.neo-chat--flowtide .chat__intent-status {
  padding: 8px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: var(--text-inv-3, rgba(255, 255, 255, 0.72));
}

.neo-chat--flowtide .chat__intent-active,
.neo-chat--flowtide .chat__intent-switch {
  margin: 0;
}

.neo-chat--flowtide .chat__intent-switch {
  margin-top: 4px;
}

.neo-chat--flowtide .cmsg__thinking {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--text-inv-3);
  font-size: 14px;
}

.neo-chat--flowtide .cmsg__thinking-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.neo-chat--flowtide .cmsg__thinking--status {
  gap: 6px;
}

.neo-chat--flowtide .cmsg__status-icon {
  flex-shrink: 0;
  color: var(--accent, var(--text-inv-3));
  opacity: 0.9;
}

.neo-chat--flowtide .cmsg__status-text {
  line-height: 1.35;
}

.neo-chat--flowtide .nc-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ---------- form_step (inside AI bubble — no extra surface) ---------- */
.neo-chat--flowtide .cmsg__form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  padding: 0;
  background: transparent;
  border: 0;
  width: 100%;
  max-width: 100%;
}

.neo-chat--flowtide .cmsg__form-label {
  margin: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-inv-3);
}

.neo-chat--flowtide .cmsg__form-required {
  color: var(--accent);
}

.neo-chat--flowtide .cmsg__form-row {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.neo-chat--flowtide .cmsg__form-row--stacked {
  justify-content: flex-end;
  margin-top: 4px;
}

.neo-chat--flowtide .cmsg__form-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 250, 235, 0.04);
  border: 1px solid var(--line-dark-2);
  border-radius: 999px;
  padding: 10px 14px;
  color: var(--text-inv);
  font: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color var(--dur-1) var(--ease);
}

.neo-chat--flowtide textarea.cmsg__form-input {
  border-radius: 14px;
  resize: vertical;
  min-height: 72px;
}

.neo-chat--flowtide .cmsg__form-input::placeholder {
  color: var(--text-inv-3);
}

.neo-chat--flowtide .cmsg__form-input:focus {
  border-color: var(--accent);
}

.neo-chat--flowtide .cmsg__form-input:disabled,
.neo-chat--flowtide .cmsg__form-input[readonly] {
  opacity: 0.72;
  cursor: default;
}

.neo-chat--flowtide .cmsg__form-btn {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background var(--dur-1) var(--ease), opacity var(--dur-1) var(--ease);
}

.neo-chat--flowtide .cmsg__form-btn:hover:not(:disabled) {
  background: #E6AC6F;
}

.neo-chat--flowtide .cmsg__form-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.neo-chat--flowtide .cmsg__form-btn svg {
  width: 14px;
  height: 14px;
}

.neo-chat--flowtide .cmsg__form-error {
  margin: 0;
  font-size: 12px;
  color: #E8A0A0;
}

.neo-chat--flowtide .cmsg__form-hint {
  margin: 0;
  font-size: 12px;
  color: var(--text-inv-3);
}

/* Light mode: form controls on paper bubble */
.neo-chat--flowtide[data-neo-mode="light"] .cmsg__form-input,
.neo-chat--flowtide[data-neo-theme="light"] .cmsg__form-input,
[data-neo-mode="light"] .neo-chat--flowtide .cmsg__form-input,
[data-neo-theme="light"] .neo-chat--flowtide .cmsg__form-input {
  background: rgba(26, 16, 24, 0.04);
  border-color: rgba(26, 16, 24, 0.12);
  color: var(--ink);
}

.neo-chat--flowtide[data-neo-mode="light"] .cmsg__form-input::placeholder,
.neo-chat--flowtide[data-neo-theme="light"] .cmsg__form-input::placeholder,
[data-neo-mode="light"] .neo-chat--flowtide .cmsg__form-input::placeholder,
[data-neo-theme="light"] .neo-chat--flowtide .cmsg__form-input::placeholder {
  color: rgba(26, 16, 24, 0.45);
}

.neo-chat--flowtide[data-neo-mode="light"] .cmsg__form-label,
.neo-chat--flowtide[data-neo-theme="light"] .cmsg__form-label,
[data-neo-mode="light"] .neo-chat--flowtide .cmsg__form-label,
[data-neo-theme="light"] .neo-chat--flowtide .cmsg__form-label {
  color: rgba(26, 16, 24, 0.55);
}

.neo-chat--flowtide[data-neo-mode="light"] .cmsg__form-hint,
.neo-chat--flowtide[data-neo-theme="light"] .cmsg__form-hint,
[data-neo-mode="light"] .neo-chat--flowtide .cmsg__form-hint,
[data-neo-theme="light"] .neo-chat--flowtide .cmsg__form-hint {
  color: rgba(26, 16, 24, 0.5);
}