/* Chat / Marketer AI view ----------------------------------------- */

.chat {
  display: grid;
  grid-template-columns: 296px 1fr;
  height: 100%;
  min-height: 0;
}

/* --- rail ------------------------------------------------------ */
.chat-rail {
  border-right: 1px solid var(--line);
  background: var(--bg);
  display: flex; flex-direction: column;
  min-height: 0;
}
/* Collapsed state — rail slims to a 44px sliver that still holds the
   expand toggle. Grid template flips via :has() so chat-main fills the
   freed space instead of auto-placing into the old 296px column. */
.chat:has(.chat-rail[data-collapsed="true"]) { grid-template-columns: 44px 1fr; }
.chat-rail[data-collapsed="true"] .chat-rail-list { display: none; }
.chat-rail[data-collapsed="true"] .chat-rail-head { padding: 14px 6px; }
.chat-rail[data-collapsed="true"] .chat-rail-head .btn-sm { display: none; }
.chat-rail-head { display: flex; gap: 8px; padding: 14px 14px 8px; }
.chat-rail-list  { flex: 1; min-height: 0; overflow-y: auto; padding: 6px 8px 12px; }
.thread-group   { padding: 4px 0; }
.thread-group-h {
  display: flex; align-items: center; gap: 6px;
  width: 100%; background: transparent; border: 0; cursor: pointer;
  font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-4); padding: 10px 8px 6px;
  text-align: left;
}
.thread-group-h:hover { color: var(--ink-2); }
.thread-group-chev {
  display: inline-flex; align-items: center; justify-content: center;
  width: 12px; height: 12px;
  color: var(--ink-4);
  transition: transform .12s ease;
}
.thread-group-chev.is-open { transform: rotate(90deg); }
.thread-group-count {
  margin-left: auto;
  font-family: var(--font-mono); font-size: 10px; font-weight: 500;
  color: var(--ink-4); letter-spacing: 0;
}
.thread {
  display: block; width: 100%; text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 2px;
  transition: background .12s, border-color .12s;
  position: relative;
}
.thread:hover { background: var(--bg-sunk); }
.thread[data-active="true"] { background: var(--bg-sunk); border-color: var(--line-2); }
.thread-top { display: flex; align-items: center; gap: 6px; }
.thread-scope {
  flex: 0 0 16px;
  width: 16px; height: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 5px;
  font-size: 9.5px; font-weight: 700; font-family: var(--font-mono);
  letter-spacing: 0; line-height: 1;
  color: var(--ink);
  background: var(--bg-sunk);
  border: 1px solid var(--line);
}
.thread-scope.is-workspace { background: var(--accent-wash); border-color: var(--accent-soft); color: var(--accent-deep); }
.thread-scope.is-project   { background: var(--bg-sunk); border-color: var(--line-2); color: var(--ink-2); }
.thread-scope.is-user      { background: transparent; border-color: var(--line); color: var(--ink-3); }
.thread-title {
  font-size: 13.5px; font-weight: 500; color: var(--ink);
  letter-spacing: -.005em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1;
}
.thread-pin { color: var(--accent-deep); display: inline-flex; }
.thread-meta {
  display: flex; align-items: center; gap: 6px; margin-top: 2px;
  font-size: 11.5px; color: var(--ink-4);
}
.thread-agent {
  color: var(--ink-3); font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 130px;
}
.thread-dot  { opacity: .5; }
.thread-time { font-family: var(--font-mono); font-size: 11px; }
.thread-unread-dot {
  position: absolute;
  top: 8px; right: 8px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* --- main ------------------------------------------------------ */
.chat-main {
  display: flex; flex-direction: column;
  min-height: 0; min-width: 0; position: relative;
  flex: 1;
}
.chat-toolbar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  flex: none;
}
.chat-thread-title { font-size: 13px; color: var(--ink-3); }
.agent-select { position: relative; }
.agent-glyph-sm {
  width: 18px; height: 18px; border-radius: 5px;
  background: var(--accent); color: var(--ink);
  display: grid; place-items: center;
  font-size: 10.5px; font-weight: 700;
}
.agent-pop {
  position: absolute;
  top: calc(100% + 6px); left: 0;
  width: 360px;
  background: var(--bg-elev);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  box-shadow: var(--sh-3);
  padding: 6px;
  z-index: 50;
}
[x-cloak] { display: none !important; }
.agent-pop-h {
  font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-4); padding: 8px 10px 6px;
}
.agent-row {
  display: flex; align-items: flex-start; gap: 10px;
  width: 100%; padding: 8px 10px;
  background: transparent; border: 1px solid transparent;
  border-radius: 10px; text-align: left;
  transition: background .12s;
}
.agent-row:hover { background: var(--bg-sunk); }
.agent-row[data-active="true"] { background: var(--accent-wash); border-color: var(--accent-soft); }
.agent-row-glyph {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--ink); color: var(--accent);
  display: grid; place-items: center;
  font-weight: 700; font-size: 13px;
  flex: none;
}
.agent-row-body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.agent-row-name { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink); }
.agent-row-desc { font-size: 12px; color: var(--ink-3); line-height: 1.4; }

/* --- welcome --------------------------------------------------- */
.chat-scroll  { flex: 1; min-height: 0; overflow-y: auto; scroll-behavior: smooth; }
.welcome      { max-width: 720px; margin: 0 auto; padding: 56px 32px 80px;
                display: flex; flex-direction: column; align-items: flex-start; }
.welcome-mark { margin-bottom: 18px; }
.welcome-spark {
  width: 56px; height: 56px; border-radius: 16px;
  background: linear-gradient(160deg, var(--accent) 0%, var(--accent-soft) 60%, var(--accent-wash) 100%);
  display: grid; place-items: center;
  box-shadow: 0 12px 36px -10px rgba(0,0,0,.18), inset 0 -3px 0 rgba(0,0,0,.06);
  color: var(--ink);
}
.welcome-h {
  font-size: 30px; font-weight: 600; letter-spacing: -.025em;
  color: var(--ink); margin: 0 0 10px; line-height: 1.15;
}
.welcome-sub {
  font-size: 15px; color: var(--ink-3); margin: 0 0 28px;
  line-height: 1.5; max-width: 540px;
  letter-spacing: -.005em;
}
.welcome-suggest { display: flex; flex-direction: column; gap: 6px; width: 100%; }
.suggest {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: left;
  transition: background .12s, border-color .12s;
  width: 100%;
  cursor: pointer;
}
.suggest:hover { background: var(--bg-sunk); border-color: var(--line-2); }
.suggest-i {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--accent-wash); color: var(--ink);
  display: grid; place-items: center;
  border: 1px solid var(--accent-soft);
  flex: none;
}
.suggest-t { flex: 1; font-size: 13px; color: var(--ink-2); line-height: 1.4; letter-spacing: -.005em; }
.suggest-arrow { color: var(--ink-4); }
.suggest:hover .suggest-arrow { color: var(--ink); }

/* --- messages -------------------------------------------------- */
.chat-stream {
  max-width: none; margin: 0;
  padding: 28px 32px 40px;
  display: flex; flex-direction: column; gap: 22px;
  align-items: flex-start;
}
.chat-stream:empty { display: none; }
.msg { display: flex; gap: 12px; }
.msg-user {
  align-self: flex-end;
  max-width: min(75ch, 80%);
}
.msg-bubble-user {
  background: var(--accent); color: var(--ink);
  padding: 8px 12px 4px;
  border-radius: 16px 16px 4px 16px;
  font-size: 14px;
  letter-spacing: -.005em;
  white-space: pre-wrap;
  border: 1px solid var(--accent-deep);
  box-shadow: inset 0 -2px 0 rgba(0,0,0,.05);
  font-weight: 500;
  display: flex; flex-direction: column; align-items: flex-end;
}
.msg-bubble-user .msg-bubble-body { align-self: stretch; }
.msg-bubble-user p { margin: 0 0 4px; }
.msg-bubble-user p:last-child { margin: 0; }
/* Quill leaves a trailing <p><br></p> after Enter — hide it so the user
 * meta line (name · time) sits flush with the last real line of text. */
.msg-bubble-user .msg-bubble-body > p:last-child:has(> br:only-child),
.msg-bubble-user .msg-bubble-body > p:last-child:empty {
  display: none;
}
.msg-user .msg-meta {
  font-size: 10.5px; color: rgba(0,0,0,.65);
  font-family: var(--font-mono);
  margin-top: 1px;
  line-height: 1;
}

/* Dark mode: --ink jest jasny (#F4F1E8), --accent zostaje jasny żółty
 * (#F5C518) → tekst na user-bubble był prawie nieczytelny. Wymuszamy
 * ciemny tekst niezależnie od motywu — accent jest jasny w obu, więc
 * dark text wygrywa kontrastowo. Meta line analogicznie bumpniemy
 * opacity żeby imię + timestamp też dobrze siedziały. */
[data-theme="dark"] .msg-bubble-user {
  color: #14130F;
}
[data-theme="dark"] .msg-user .msg-meta {
  color: rgba(0,0,0,.7);
}
/* Timestamp w bubble agenta w dark — --ink-4 (#7E7969) ma marginalny
 * kontrast na --bg-elev (#161513). Bumpujemy do --ink-3 (#ADA89A). */
[data-theme="dark"] .msg-time {
  color: var(--ink-3);
}

.msg-agent {
  align-self: flex-start;
  max-width: min(75ch, 85%);
  align-items: flex-start;
  padding: 14px;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 4px 16px 16px 16px;
  box-shadow: 0 1px 0 rgba(0,0,0,.03);
}
.msg-avatar { flex: none; }
.msg-avatar-glyph {
  width: 32px; height: 32px; border-radius: 10px;
  background: linear-gradient(160deg, var(--accent) 0%, var(--accent-soft) 60%, var(--accent-wash) 100%);
  color: var(--ink);
  display: grid; place-items: center;
  border: 1px solid var(--accent-deep);
  box-shadow: 0 2px 6px -2px rgba(0,0,0,.15);
  font-weight: 700; font-size: 13px; font-family: var(--font-mono);
  letter-spacing: 0; line-height: 1;
}
.msg-avatar-glyph.is-workspace {
  background: linear-gradient(160deg, var(--accent) 0%, var(--accent-soft) 60%, var(--accent-wash) 100%);
  border-color: var(--accent-deep);
  color: var(--ink);
}
.msg-avatar-glyph.is-project {
  background: var(--bg-sunk);
  border-color: var(--line-2);
  color: var(--ink-2);
}
.msg-avatar-glyph.is-user {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--accent);
}
.msg-body, .msg-bubble-wrap { flex: 1; min-width: 0; }
.msg-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--ink-2);
  margin-bottom: 4px;
}
.msg-head b { font-weight: 600; color: var(--ink); }
.msg-time { font-family: var(--font-mono); font-size: 11px; color: var(--ink-4); margin-left: auto; }
/* Markdown bubble typography — applies to both the agent body
   (.msg-body) and the user bubble (.msg-bubble) so user-side rich text
   is styled identically. The :is() grouping keeps the selectors short
   and avoids the "wrong split" trap from a naive find-replace. */
:is(.msg-body, .msg-bubble) { font-size: 14px; line-height: 1.55; color: var(--ink-2); letter-spacing: -.003em; }
:is(.msg-body, .msg-bubble) p { margin: 0 0 10px; }
:is(.msg-body, .msg-bubble) p:last-child { margin: 0; }
:is(.msg-body, .msg-bubble) ul,
:is(.msg-body, .msg-bubble) ol { margin: 0 0 10px; padding-left: 20px; }
:is(.msg-body, .msg-bubble) li { margin-bottom: 4px; }
:is(.msg-body, .msg-bubble) code {
  font-family: var(--font-mono); font-size: 12px;
  background: var(--bg-sunk);
  padding: 1px 5px; border-radius: 4px;
}
:is(.msg-body, .msg-bubble) b,
:is(.msg-body, .msg-bubble) strong { color: var(--ink); font-weight: 600; }
:is(.msg-body, .msg-bubble) em,
:is(.msg-body, .msg-bubble) i { font-style: italic; }
:is(.msg-body, .msg-bubble) h1,
:is(.msg-body, .msg-bubble) h2,
:is(.msg-body, .msg-bubble) h3 {
  color: var(--ink); font-weight: 700;
  margin: 12px 0 6px; line-height: 1.2;
}
:is(.msg-body, .msg-bubble) h1 { font-size: 1.35em; }
:is(.msg-body, .msg-bubble) h2 { font-size: 1.2em; }
:is(.msg-body, .msg-bubble) h3 { font-size: 1.05em; }
:is(.msg-body, .msg-bubble) blockquote {
  border-left: 3px solid var(--line-2); padding-left: 10px;
  margin: 6px 0; color: var(--ink-3);
}
:is(.msg-body, .msg-bubble) pre {
  background: var(--bg-sunk); border: 1px solid var(--line);
  border-radius: 6px; padding: 8px 10px; overflow-x: auto;
  font-size: 12.5px; line-height: 1.4;
  font-family: var(--font-mono);
  margin: 6px 0;
}
:is(.msg-body, .msg-bubble) pre code { background: transparent; padding: 0; border-radius: 0; }
:is(.msg-body, .msg-bubble) a {
  color: var(--accent-deep); text-decoration: underline;
  word-break: break-word;
}
:is(.msg-body, .msg-bubble) hr { border: 0; border-top: 1px solid var(--line); margin: 12px 0; }
:is(.msg-body, .msg-bubble) table {
  border-collapse: collapse; font-size: 13px; margin: 8px 0;
}
:is(.msg-body, .msg-bubble) th,
:is(.msg-body, .msg-bubble) td {
  border: 1px solid var(--line); padding: 4px 8px; text-align: left;
}
.msg-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }

/* Inline artefakt w bańce agenta — render area pod BodyHTML, ładowana
   przez HTMX hx-get on load. Wizualnie: lekki kontener z border, żeby
   artefakt nie zlewał się z tekstem wiadomości. Loading state to to
   samo "thinking" animation co w ThinkingBubble. */
.msg-inline-artifact {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-sunk);
}
.msg-inline-artifact-loading {
  display: flex; align-items: center; justify-content: center;
  min-height: 32px; color: var(--ink-4);
}

.msg-attachments {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 8px;
}
.msg-attach {
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none;
  border-radius: 8px;
  transition: transform .12s, box-shadow .12s;
}
.msg-attach-img {
  display: block;
  border: 1px solid var(--line);
  overflow: hidden;
  max-width: 220px; max-height: 220px;
}
.msg-attach-img img { display: block; max-width: 220px; max-height: 220px; object-fit: cover; }
.msg-attach-img:hover { transform: scale(1.02); box-shadow: var(--sh-2); }
.msg-attach-file {
  padding: 6px 10px;
  background: var(--bg-sunk); border: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink-2);
}
.msg-attach-file:hover { background: var(--bg); border-color: var(--ink-4); color: var(--ink); }
.msg-attach-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-attach-size { color: var(--ink-4); font-size: 11.5px; margin-left: 4px; }

/* KB viewer modal — opened by clicking a knowledge mention chip. */
.kb-viewer-body { max-height: 60vh; overflow-y: auto; padding: 14px 20px 18px; font-size: 14px; line-height: 1.55; color: var(--ink-2); }
.kb-viewer-body p { margin: 0 0 10px; }
.kb-viewer-body h1, .kb-viewer-body h2, .kb-viewer-body h3 { color: var(--ink); margin: 14px 0 6px; }
.kb-viewer-body h1 { font-size: 1.35em; } .kb-viewer-body h2 { font-size: 1.18em; } .kb-viewer-body h3 { font-size: 1.05em; }
.kb-viewer-body ul, .kb-viewer-body ol { margin: 0 0 10px; padding-left: 20px; }
.kb-viewer-body code { font-family: var(--font-mono); background: var(--bg-sunk); padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }
.kb-viewer-body pre { background: var(--bg-sunk); border: 1px solid var(--line); border-radius: 6px; padding: 10px; overflow-x: auto; }
.kb-viewer-body blockquote { border-left: 3px solid var(--line-2); padding-left: 10px; color: var(--ink-3); margin: 6px 0; }
.kb-viewer-body a { color: var(--accent-deep); text-decoration: underline; }
.kb-viewer-pre { white-space: pre-wrap; word-break: break-word; }
.kb-viewer-err { color: var(--bad); font-style: italic; }

/* User card popover — opened by clicking a @user mention chip. */
.user-card-backdrop {
  position: fixed; inset: 0; z-index: 220;
  background: rgba(20, 19, 15, .25);
  display: grid; place-items: center;
}
.user-card {
  position: relative;
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: 0 12px 32px rgba(0,0,0,.18);
  width: 320px; padding: 18px 18px 14px;
}
.user-card-close {
  position: absolute; top: 8px; right: 8px;
  width: 26px; height: 26px;
  border: 0; background: transparent;
  color: var(--ink-4); border-radius: 6px;
  display: grid; place-items: center; cursor: pointer;
}
.user-card-close:hover { background: var(--bg-sunk); color: var(--ink-2); }
.user-card-head { display: flex; gap: 12px; align-items: center; }
.user-card-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--accent-deep); color: var(--bg);
  display: grid; place-items: center;
  font-weight: 600; font-size: 18px;
  flex: 0 0 48px;
}
.user-card-meta { min-width: 0; flex: 1; }
.user-card-name { font-weight: 600; font-size: 15px; color: var(--ink); margin-bottom: 2px; word-break: break-word; }
.user-card-email { font-size: 12.5px; color: var(--accent-deep); text-decoration: none; word-break: break-all; }
.user-card-email:hover { text-decoration: underline; }
.user-card-warn { margin: 12px 0 0; font-size: 12px; color: var(--warn, #8a5a00); }

/* Saved-filter preview modal */
.filter-preview-q { padding: 12px 18px 0; }
.filter-preview-label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-4); margin-bottom: 6px; }
.filter-preview-query {
  display: block; padding: 10px 12px;
  background: var(--bg-sunk); border: 1px solid var(--line); border-radius: 6px;
  font-family: var(--font-mono); font-size: 12.5px; color: var(--ink);
  white-space: pre-wrap; word-break: break-word;
}
.filter-preview-hint { padding: 8px 18px 12px; font-size: 12px; color: var(--ink-3); margin: 0; }
.filter-preview-warn { padding: 8px 18px 12px; font-size: 13px; color: var(--warn, #8a5a00); margin: 0; }

.thinking {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--ink-4);
}
.thinking i {
  width: 4px; height: 4px; border-radius: 50%; background: var(--ink-4);
  display: inline-block;
  animation: dot 1.1s infinite ease-in-out;
}
.thinking i:nth-child(2) { animation-delay: .15s; }
.thinking i:nth-child(3) { animation-delay: .3s; }
@keyframes dot {
  0%, 80%, 100% { opacity: .25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-2px); }
}

/* --- composer -------------------------------------------------- */
.composer {
  flex: none;
  padding: 12px 32px 18px;
  background: var(--bg);
  border-top: 1px solid var(--line);
}
.composer-inner {
  max-width: none; margin: 0;
  background: var(--bg-elev);
  border: 1px solid var(--line-2);
  border-radius: 16px;
  padding: 10px 12px 8px;
  transition: border-color .15s, box-shadow .15s;
  box-shadow: var(--sh-2);
  position: relative;
}
.composer-inner:focus-within {
  border-color: var(--ink-3);
  box-shadow: 0 0 0 4px var(--accent-wash), var(--sh-2);
}
.composer textarea {
  width: 100%;
  min-height: 48px;
  max-height: 220px;
  border: 0;
  background: transparent;
  outline: none;
  resize: none;
  font-family: var(--font-sans);
  font-size: 14.5px;
  letter-spacing: -.005em;
  color: var(--ink);
  padding: 4px 4px 4px;
}
.composer textarea::placeholder { color: var(--ink-4); }

/* Rich-text editor — Quill bubble theme: no permanent toolbar, only a
   floating popover on selection. The composer-editor-wrap reserves
   space; the editor itself is borderless and inherits typography. */
.composer-editor-wrap {
  display: flex; flex-direction: column;
  min-height: 84px; max-height: 280px;
  position: relative; /* anchor for the absolutely-positioned bubble */
}
.composer-editor-wrap .ql-container.ql-bubble {
  border: 0; font-family: var(--font-sans);
  font-size: 14.5px; letter-spacing: -.005em;
  color: var(--ink); min-height: 84px;
  /* overflow stays visible so the bubble tooltip can flow above the
     selection without being clipped; the editor itself caps height. */
  overflow: visible;
  position: relative;
}
.composer-editor-wrap .ql-editor {
  padding: 2px 4px; min-height: 84px;
  max-height: 220px; overflow-y: auto;
}
.composer-editor-wrap .ql-editor.ql-blank::before {
  color: var(--ink-4); font-style: normal; left: 4px; right: 4px;
}
/* Fallback placeholder — visible even if Quill's init never marks the
   editor with .ql-blank (corner case on chat thread pages). Uses the
   data-placeholder attribute the host put on #composer-editor, with a
   generic prompt as last-ditch fallback so the field never looks dead. */
.composer-editor-wrap .ql-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--ink-4);
  font-style: normal;
  pointer-events: none;
  position: absolute;
  left: 4px; right: 4px;
}
.composer-editor-wrap #composer-editor[data-placeholder]:not(.ql-container):empty::before {
  content: attr(data-placeholder);
  display: block; padding: 2px 4px;
  color: var(--ink-4);
  pointer-events: none;
}
.composer-editor-wrap .ql-editor h1 { font-size: 1.4em; font-weight: 700; margin: 0; }
.composer-editor-wrap .ql-editor h2 { font-size: 1.2em; font-weight: 700; margin: 0; }
.composer-editor-wrap .ql-editor h3 { font-size: 1.05em; font-weight: 700; margin: 0; }
.composer-editor-wrap .ql-editor blockquote {
  border-left: 3px solid var(--line-2); padding-left: 8px;
  color: var(--ink-3); margin: 4px 0;
}
.composer-editor-wrap .ql-editor pre.ql-syntax,
.composer-editor-wrap .ql-editor pre {
  background: var(--bg-sunk); border: 1px solid var(--line);
  border-radius: 6px; padding: 8px 10px; font-size: 13px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.composer-editor-wrap .ql-editor a {
  color: var(--accent-deep); text-decoration: underline;
}
/* Bubble toolbar — float over selection, blend with the DS chrome.
   Hidden by default so the dark bar never flashes on init or when
   Quill hasn't positioned it yet. Quill removes ql-hidden when the
   user selects text — that's when we animate it in. */
.ql-bubble .ql-tooltip {
  background: var(--ink); color: var(--bg);
  border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.18);
  z-index: 1000;
  transition: opacity .12s ease-out;
  display: none !important;
}
.ql-bubble .ql-tooltip:not(.ql-hidden) {
  display: block !important;
  animation: ql-bubble-in .14s ease-out;
}
@keyframes ql-bubble-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.ql-bubble .ql-tooltip.ql-hidden { display: none !important; }
.ql-bubble .ql-tooltip-arrow { border-bottom-color: var(--ink); }
.ql-bubble.ql-toolbar button,
.ql-bubble .ql-toolbar button { color: var(--bg); }
.ql-bubble .ql-stroke { stroke: var(--bg); }
.ql-bubble .ql-fill   { fill: var(--bg); }
.ql-bubble .ql-active .ql-stroke,
.ql-bubble button:hover .ql-stroke { stroke: var(--accent-light); }
.ql-bubble .ql-active .ql-fill,
.ql-bubble button:hover .ql-fill { fill: var(--accent-light); }
.ql-bubble .ql-picker-label { color: var(--bg); }
.ql-bubble .ql-picker-options { background: var(--ink); color: var(--bg); }

/* Attachment chips — appear above the editor when files are queued.
   Hidden when empty (JS toggles display) so the composer doesn't
   reserve dead space. */
.composer-attach-strip {
  display: none; flex-wrap: wrap; gap: 6px;
  padding: 4px 0 8px;
}
.composer-attach-strip:not(:empty) { display: flex; }
.composer-attach-chip {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 24px 4px 6px;
  background: var(--bg-sunk); border: 1px solid var(--line);
  border-radius: 8px; font-size: 12px;
  cursor: grab;
}
.composer-attach-chip:active { cursor: grabbing; }
.composer-attach-chip-ghost {
  opacity: .4; background: var(--accent-wash);
  border-color: var(--accent-deep);
}
.composer-attach-chip img {
  width: 32px; height: 32px; object-fit: cover; border-radius: 4px;
}
.composer-attach-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.composer-attach-chip.is-uploading { opacity: .6; }
.composer-attach-x {
  position: absolute; right: 4px; top: 4px;
  width: 16px; height: 16px; padding: 0;
  border: 0; background: transparent; cursor: pointer;
  color: var(--ink-3); font-size: 14px; line-height: 1;
}
.composer-attach-x:hover { color: var(--bad); }
.composer-attach-spin {
  position: absolute; right: 22px; top: 50%;
  width: 10px; height: 10px; margin-top: -5px;
  border: 1.5px solid var(--ink-4); border-top-color: transparent;
  border-radius: 50%; animation: composer-spin .7s linear infinite;
}
@keyframes composer-spin { to { transform: rotate(360deg); } }

/* Mention popover — quill-mention default look adapted to the DS. */
.ql-mention-list-container {
  z-index: 100;
  background: var(--bg-elev) !important; border: 1px solid var(--line) !important;
  border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.10);
  min-width: 320px !important; max-width: 420px !important;
  max-height: 280px; overflow-y: auto;
  /* Override vendor's hardcoded width: 270px */
  width: auto !important;
}
.ql-mention-list { padding: 4px; }
.ql-mention-list-item {
  padding: 6px 10px; border-radius: 6px; font-size: 13px;
  display: flex; align-items: center; gap: 8px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.4;
  height: auto;
}
.ql-mention-list-item > span {
  display: inline-flex; align-items: center; gap: 6px;
  min-width: 0; flex: 1;
}
.ql-mention-list-item.selected, .ql-mention-list-item:hover {
  background: var(--bg-sunk); cursor: pointer;
}
.ql-mention-list-item:has(.cm-disabled),
.cm-disabled {
  color: var(--ink-4);
  font-style: italic;
}
.cm-kind {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px;
  color: var(--ink-4);
  flex-shrink: 0;
}
.cm-kind svg { display: block; }
.cm-sub { color: var(--ink-4); font-size: 11.5px; margin-left: 4px; }
.cm-hint {
  margin-left: auto; padding: 1px 6px;
  background: var(--bg-sunk); border: 1px solid var(--line);
  border-radius: 4px; font-family: var(--font-mono);
  font-size: 11px; color: var(--ink-4);
  white-space: nowrap;
}
/* Mention chip — same look in the composer and in rendered bubbles.
   The vendor quill-mention CSS hardcodes width/height/padding-y which
   forces the chip to break onto its own line; override all of those so
   the chip flows inline like normal text. */
.mention {
  display: inline !important;
  width: auto !important;
  height: auto !important;
  background: var(--accent-wash) !important;
  color: var(--accent-deep) !important;
  padding: 0 5px !important;
  margin: 0 1px !important;
  border-radius: 4px !important;
  font-weight: 500;
  line-height: inherit;
}
.mention > span { margin: 0 !important; }
/* In rendered bubbles the chip routes to an object drawer/page; make
   the affordance obvious. Composer chips stay neutral since they're
   intrinsic to the textarea. */
.msg-bubble .mention[data-mention-kind],
.msg-body   .mention[data-mention-kind] { cursor: pointer; }
.msg-bubble .mention[data-mention-kind]:hover,
.msg-body   .mention[data-mention-kind]:hover { filter: brightness(.95); }
.mention-knowledge { background: var(--bg-sunk) !important; color: var(--ink-2) !important; }
.mention-task       { background: var(--info-wash, #e7f0ff) !important; color: var(--info, #1c5fb8) !important; }
.mention-workflow   { background: var(--warn-wash, #fff4dc) !important; color: var(--warn, #8a5a00) !important; }
.mention-connection { background: var(--good-wash, #e2f6e9) !important; color: var(--good, #1a7a3f) !important; }
.mention-filter     { background: var(--y-wash, #fff8d6) !important; color: var(--ink, #14130f) !important; border: 1px dashed var(--ink-3, #69695c) !important; }

/* ── Composer help drawer ─────────────────────────────────────────
   Right-edge slide-in panel with "Spróbuj X → zobacz Y" examples for
   every mention trigger + Markdown shortcut the composer supports.
   Toggled by the help button via a composer-help custom event so
   Composer doesn't need a parent Alpine scope. */
.help-drawer { position: fixed; inset: 0; z-index: 200; pointer-events: none; }
.help-drawer-backdrop {
  position: absolute; inset: 0;
  background: rgba(20, 19, 15, .35);
  pointer-events: auto;
}
.help-drawer-pane {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 480px; max-width: 92vw;
  background: var(--bg-elev);
  border-left: 1px solid var(--line);
  box-shadow: -12px 0 32px rgba(0, 0, 0, .12);
  display: flex; flex-direction: column;
  pointer-events: auto;
  animation: help-drawer-in .22s cubic-bezier(.2, .8, .2, 1);
}
@keyframes help-drawer-in {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}
.help-drawer-h {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}
.help-drawer-h h2 { margin: 0; font-size: 16px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.help-drawer-sub { margin: 4px 0 0; font-size: 12.5px; color: var(--ink-3); }
.help-drawer-h .iconbtn { flex: 0 0 auto; margin-left: auto; }
.help-drawer-body { padding: 14px 20px 24px; overflow-y: auto; flex: 1; }

.help-section { margin-bottom: 22px; }
.help-section-h {
  display: flex; align-items: center; gap: 8px;
  color: var(--ink-3); margin-bottom: 6px;
}
.help-section-h h3 {
  margin: 0; font-size: 13px; font-weight: 600;
  color: var(--ink); letter-spacing: .01em;
  text-transform: uppercase;
}
.help-section-h .kbd { text-transform: none; font-size: 11px; }
.help-section p { margin: 0 0 8px; font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
.help-hint {
  margin-top: 6px !important;
  font-size: 12px !important;
  color: var(--ink-3) !important;
}
.help-subhead {
  margin: 14px 0 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}
.help-subhead:first-of-type { margin-top: 8px; }
.help-section-tip {
  background: var(--accent-wash); border: 1px solid var(--accent-light);
  border-radius: 10px; padding: 14px 16px;
  margin-bottom: 12px;
}
.help-section-tip .help-section-h h3 { color: var(--accent-deep); }

.help-card {
  background: var(--bg-sunk); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 6px;
}
.help-card-row {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px;
}
.help-card-row-block { flex-direction: column; align-items: flex-start; gap: 6px; }
.help-card-label {
  font-size: 11px; color: var(--ink-4);
  text-transform: uppercase; letter-spacing: .04em;
  flex: 0 0 64px;
}
.help-card-input {
  background: var(--bg); border: 1px solid var(--line);
  padding: 2px 6px; border-radius: 4px;
  font-family: var(--font-mono); font-size: 12px;
}
.help-example {
  padding: 8px 10px; background: var(--bg);
  border: 1px solid var(--line); border-radius: 6px;
  font-size: 13px; line-height: 1.6;
}

.help-table {
  display: flex; flex-direction: column; gap: 6px;
  margin: 8px 0;
}
.help-table-row {
  display: grid; grid-template-columns: 130px 14px auto 1fr;
  align-items: center; gap: 8px;
  font-size: 13px;
}
.help-table-trigger {
  background: var(--bg-sunk); border: 1px solid var(--line);
  padding: 2px 6px; border-radius: 4px;
  font-family: var(--font-mono); font-size: 12px;
  color: var(--ink);
}
.help-table-arrow { color: var(--ink-4); text-align: center; }
.help-table-note { color: var(--ink-3); font-size: 12.5px; }

.help-list {
  margin: 6px 0; padding-left: 20px;
  font-size: 13.5px; color: var(--ink-2); line-height: 1.7;
}
.help-list li { margin-bottom: 2px; }
.help-inline-icon {
  display: inline-flex; align-items: center; vertical-align: -2px;
  color: var(--ink-3); margin: 0 2px;
}

.help-footer {
  padding-top: 12px; margin-top: 8px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.help-footer-link {
  font-size: 12.5px; color: var(--ink-3);
  text-decoration: none;
}
.help-footer-link:hover { color: var(--accent-deep); }

.kbd {
  background: var(--bg-sunk); border: 1px solid var(--line);
  padding: 1px 6px; border-radius: 4px;
  font-family: var(--font-mono); font-size: 11.5px;
  color: var(--ink);
}

.composer-help-btn.composer-help-btn {
  position: absolute;
  top: 6px; right: 6px;
  width: 26px; height: 26px;
  min-width: 0;
  padding: 0;
  color: var(--ink-4);
  display: inline-flex; align-items: center; justify-content: center;
}
.composer-help-btn:hover { color: var(--accent-deep); }
.composer-trigger-btn.composer-trigger-btn {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 13px;
  color: var(--ink-3);
  min-width: 26px; height: 26px;
  padding: 0 6px;
}
.composer-trigger-btn:hover { color: var(--accent-deep); background: var(--bg-sunk); }
/* Snappy CSS tooltip: shows on hover *before* the native title=. */
.composer-trigger-btn[title]:hover::after,
.composer-attach-btn[title]:hover::after,
.composer-help-btn[title]:hover::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 8px;
  background: var(--ink);
  color: var(--bg);
  font-size: 11.5px;
  border-radius: 5px;
  white-space: nowrap;
  pointer-events: none;
  z-index: 50;
  box-shadow: var(--sh-2);
}
.composer-trigger-btn,
.composer-attach-btn { position: relative; }
.composer-tools {
  display: flex; align-items: center;
  margin-top: 4px; gap: 4px;
}
.composer-left  { display: flex; align-items: center; gap: 2px; flex: 1; }
.composer-right { display: flex; align-items: center; gap: 8px; }
.btn-send {
  width: 32px; height: 32px;
  border-radius: 999px;
  border: 0;
  background: var(--ink); color: var(--bg);
  display: grid; place-items: center;
  transition: background .12s, transform .06s, opacity .12s;
  cursor: pointer;
}
.btn-send:hover  { background: var(--ink-2); }
.btn-send:active { transform: scale(.96); }
.btn-send:disabled { opacity: .3; cursor: not-allowed; background: var(--ink-5); }
.composer-foot {
  max-width: 780px; margin: 8px auto 0;
  font-size: 11.5px; color: var(--ink-4);
  text-align: center;
}

/* The chat takes the entire view area — no view-header is rendered. */
.app .view:has(.chat) { padding: 0; }

@media (max-width: 960px) {
  .chat { grid-template-columns: 1fr; }
  .chat-rail { display: none; }

  /* Composer — trim outer padding so we keep real estate for typing.
     The inner card stays rounded but loses the 32px side gutters. */
  .composer { padding: 8px 10px 12px; }
  .composer-inner { padding: 8px 10px 6px; border-radius: 12px; }
  .composer-editor-wrap { min-height: 64px; max-height: 200px; }
  .composer-editor-wrap .ql-container.ql-bubble,
  .composer-editor-wrap .ql-editor { min-height: 64px; }
  .composer-editor-wrap .ql-editor { max-height: 160px; }

  /* Attach strip wraps onto multiple rows instead of cropping. */
  .composer-attach-strip { flex-wrap: wrap; }
  .composer-attach-name { max-width: 100px; }

  /* Mention / slash picker — full bleed minus a 12px viewport margin.
     The fixed positioning still anchors to the caret, but the width
     cap keeps it from punching off-screen on narrow phones. */
  .ql-mention-list-container {
    min-width: 0 !important;
    max-width: calc(100vw - 24px) !important;
    width: calc(100vw - 24px) !important;
    left: 12px !important;
  }

  /* Help drawer — full width on phones, no awkward 480px stub. */
  .help-drawer-pane { width: 100vw !important; max-width: 100vw !important; }

  /* Welcome screen — drop the giant top padding so the prompt sits in view.
     Also scale the headline down: 30px in a 358px column breaks the second
     line awkwardly and the trailing "?" can vanish off-screen on very
     narrow phones. */
  .welcome { padding: 24px 16px 40px; }
  .welcome-h { font-size: 22px; line-height: 1.2; }
  .welcome-sub { font-size: 14px; margin-bottom: 18px; }
  .welcome-spark { width: 44px; height: 44px; border-radius: 12px; }
}

/* === chat artifact panel ====================================== */
/* Split layout: artifact panel (60%, left) + chat conversation (40%, right).
 * Active only when ChatMainVM.ArtifactPanel != nil (root gets
 * .has-artifacts). Legacy chat without artefacts uses the original
 * single-column flex layout above. */

/* .chat-main-conv jest wewnętrznym wrapperem konwersacji (toolbar +
 * scroll + composer + foot). Wprowadzony w fazie 0 żeby umożliwić
 * split layout has-artifacts. W trybie legacy single-column musi
 * dziedziczyć flex: 1 od chat-main + sam być flex column, inaczej
 * composer zwija się do góry (chat-scroll z flex: 1 mierzy się przeciwko
 * temu wrapperowi, nie chat-main bezpośrednio). */
.chat-main-conv {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  min-width: 0;
}

.chat-main.has-artifacts {
  display: grid;
  grid-template-columns: 3fr 2fr;
  grid-template-rows: 100%;
  min-height: 0;
}
.chat-main.has-artifacts .chat-main-conv {
  border-left: 1px solid var(--line);
}

/* Artifact panel — left side */
.chat-artifact-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  background: var(--bg);
}
.chat-artifact-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  scrollbar-width: thin;
  background: var(--bg-elev);
}
.chat-artifact-tabs::-webkit-scrollbar { height: 6px; }
.chat-artifact-tab {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  border-radius: var(--r-sm);
  background: transparent;
  transition: background .12s ease;
}
.chat-artifact-tab:hover { background: var(--bg-sunk); }
.chat-artifact-tab[data-active="true"] {
  background: var(--accent-wash);
  outline: 1px solid var(--accent-soft);
}
.chat-artifact-tab-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--ink);
  background: transparent;
  border: 0;
  cursor: pointer;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chat-artifact-tab-label > span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.chat-artifact-kind {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-3);
  flex-shrink: 0;
}
.chat-artifact-tab[data-active="true"] .chat-artifact-kind { color: var(--accent-deep); }
.chat-artifact-tab-close {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 4px;
  border: 0;
  background: transparent;
  color: var(--ink-3);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  border-radius: var(--r-xs);
}
.chat-artifact-tab-close:hover {
  background: var(--bg-elev);
  color: var(--ink);
}

.chat-artifact-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: var(--bg);
}

/* Empty state — shown when no tab is open. */
.chat-artifact-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  height: 100%;
  min-height: 200px;
  color: var(--ink-3);
  padding: 32px 24px;
  gap: 12px;
}
.chat-artifact-empty-glyph {
  width: 64px;
  height: 64px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  color: var(--ink-4);
}
.chat-artifact-empty-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-2);
}
.chat-artifact-empty-sub {
  font-size: 13px;
  line-height: 1.5;
  max-width: 320px;
  margin: 0;
}

/* Mobile toggle — desktop hides it (panel always visible in split).
 * Mobile shows it in the toolbar with a badge for active tab count. */
.chat-artifact-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 4px;
  position: relative;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line-2);
  background: var(--bg-elev);
  color: var(--ink-2);
  border-radius: var(--r-sm);
  cursor: pointer;
}
.chat-artifact-toggle:hover { background: var(--bg-sunk); }
.chat-artifact-toggle-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--accent);
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--bg);
}

/* Mobile: collapse split to chat-only, artifact panel slides in
 * full-screen when toggle button flips .is-open class. */
@media (max-width: 960px) {
  .chat-main.has-artifacts {
    grid-template-columns: 1fr;
  }
  .chat-main.has-artifacts .chat-artifact-panel {
    display: none;
  }
  .chat-main.has-artifacts .chat-artifact-panel.is-open {
    display: flex;
    position: fixed;
    inset: 0;
    z-index: 50;
    background: var(--bg);
  }
  .chat-main.has-artifacts .chat-main-conv {
    border-left: 0;
  }
  .chat-artifact-toggle {
    display: inline-flex;
  }
}

/* Wizard organism — krokowy formularz generowany przez agenta. Slot
   wewnątrz artifact panelu lub bańki agent message; server-side step
   transition (HTMX outerHTML swap całego .wizard na każdy klik). */
.wizard {
  display: flex; flex-direction: column;
  gap: 14px;
}
.wizard-header { display: flex; flex-direction: column; gap: 8px; }
.wizard-header h3 { margin: 0; font-size: 15px; color: var(--ink); }
.wizard-description { margin: 0; color: var(--ink-3); font-size: 13px; }
.wizard-progress {
  display: flex; flex-direction: row; align-items: center;
  gap: 6px; margin: 0; padding: 0; list-style: none;
  font-size: 12px; color: var(--ink-3);
}
.wizard-progress-step { display: inline-flex; align-items: center; gap: 6px; }
.wizard-progress-step + .wizard-progress-step::before {
  content: ""; width: 12px; height: 1px; background: var(--line);
  margin: 0 2px;
}
.wizard-progress-dot {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 999px;
  background: var(--bg-sunk); border: 1px solid var(--line);
  font-size: 11px; color: var(--ink-4);
}
.wizard-progress-step-active .wizard-progress-dot {
  border-color: var(--accent); color: var(--accent-deep);
  background: var(--accent-wash);
}
.wizard-progress-step-done .wizard-progress-dot {
  background: var(--accent); color: white; border-color: var(--accent);
}
.wizard-progress-label { color: var(--ink-3); }
.wizard-progress-step-active .wizard-progress-label { color: var(--ink); font-weight: 500; }

.wizard-form { display: flex; flex-direction: column; gap: 12px; }
.wizard-step-title { margin: 0; font-size: 13.5px; color: var(--ink-2); }
.wizard-fields { display: flex; flex-direction: column; gap: 10px; }
.wizard-field { display: flex; flex-direction: column; gap: 4px; }
.wizard-field-label { font-size: 12.5px; color: var(--ink-2); }
.wizard-field-required { color: var(--accent-deep); margin-left: 2px; }
.wizard-field-help { color: var(--ink-4); font-size: 11.5px; }
.wizard-error {
  padding: 8px 10px; border-radius: 8px;
  background: var(--bad-soft); color: var(--bad-deep);
  border: 1px solid var(--bad); font-size: 12.5px;
}

.wizard-footer { display: flex; gap: 8px; align-items: center; }

.wizard-completed {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg-sunk);
}
.wizard-completed-ok-banner { border-color: var(--good); background: var(--good-soft); }
.wizard-completed-error-banner { border-color: var(--bad); background: var(--bad-soft); }
.wizard-completed-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
  font-size: 13px;
}
.wizard-completed-head strong { color: var(--ink); }
.wizard-completed-time { color: var(--ink-4); font-size: 11.5px; }
.wizard-completed-result, .wizard-completed-error {
  margin: 0; color: var(--ink-2); font-size: 12.5px; line-height: 1.5;
}
.wizard-completed-error { color: var(--bad-deep); }
