/* ── AI Tech Solutions (ai.js, migrations 094–095) ───────────────────────
   The page reuses the Clients layout (.clients-grid, .client-card, .cp-*) and a brand's task rows (.bt-*,
   brandtasks.css); only what is new lives here. */

/* the project card: the solution on two lines at most */
.ai-cc-sol { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.45; }

/* the next step, on top of every tab */
.ai-next { align-items: flex-start; margin-bottom: 0; }
.ai-next-body { flex: 1; min-width: 0; }
.ai-next-txt { font-size: 14px; font-weight: 600; line-height: 1.5; overflow-wrap: anywhere; }
.ai-next-mine { margin-top: 6px; font-size: 12.5px; line-height: 1.5; }
.ai-next-mine b { font-weight: 700; }
.ai-late { font-weight: 800; text-decoration: underline; text-underline-offset: 2px; }
.ai-next .ai-next-btn { flex-shrink: 0; background: var(--surface); color: var(--ink); border-color: transparent; }

/* the six tabs: one row that scrolls sideways on a phone */
.ai-tabs { display: flex; max-width: 100%; overflow-x: auto; scrollbar-width: none; align-self: flex-start; }
.ai-tabs::-webkit-scrollbar { display: none; }
.ai-tabs button { white-space: nowrap; }
.ai-tabs .n { font-size: 11px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ai-tabs button.on .n { color: var(--ink-2); }

.ai-panel { min-width: 0; }
.ai-grid { align-items: stretch; }
.ai-text { font-size: 13px; line-height: 1.65; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-deal .cpc-scope { overflow-wrap: anywhere; }

/* overview lists */
.ai-phases, .ai-wait, .ai-mini { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ai-phases li { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--ink); }
.ai-phases li.is-done { color: var(--ink-3); }
.ai-ph-name { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.ai-ph-n { display: inline-flex; gap: 8px; font-size: 12px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; flex-shrink: 0; }
.ai-wait li { display: flex; align-items: baseline; gap: 8px; font-size: 13px; line-height: 1.45; color: var(--ink); }
.ai-wait-t { min-width: 0; overflow-wrap: anywhere; }
.ai-tag { flex-shrink: 0; font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--act); color: var(--act-ink); }
.ai-tag-q { background: var(--motion); color: var(--motion-ink); }
.ai-mini li { display: flex; align-items: baseline; gap: 10px; font-size: 13px; line-height: 1.45; color: var(--ink); }
.ai-mini-date { flex-shrink: 0; min-width: 48px; font-size: 12px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ai-doc-a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.ai-doc-a.is-local { text-decoration: none; font-weight: 500; color: var(--ink-2); }
.ai-more { align-self: flex-start; margin-top: auto; padding: 4px 0 0; border: 0; background: none; cursor: pointer;
  font-size: 12.5px; font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.ai-more:hover { color: var(--ink-2); }

/* tab bodies */
.ai-tasks, .ai-qs, .ai-logs, .ai-docs { display: flex; flex-direction: column; }
.ai-tasks > .cpb-head, .ai-qs > .cpb-head, .ai-logs > .cpb-head, .ai-docs > .cpb-head { margin-bottom: 10px; }
.ai-list { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.ai-empty { padding: 6px 2px; }
.bt-who-dev { background: transparent; border: 1px solid var(--ink-3); color: var(--ink); }

.ai-q.is-answered .bt-title { color: var(--ink-2); }
.ai-answer { margin: 5px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--ink-2); overflow-wrap: anywhere; }
.ai-answer b { color: var(--ink); font-weight: 600; }

.ai-log-row, .ai-doc-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--border); }
.ai-log-row:first-child, .ai-doc-row:first-child { border-top: 0; }
.ai-log-date { flex-shrink: 0; width: 64px; padding-top: 1px; font-size: 12px; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ai-log-main { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.5; color: var(--ink); }
.ai-log-main b { font-weight: 600; }
.ai-log-main p { margin: 4px 0 0; font-size: 12.5px; line-height: 1.6; color: var(--ink-2); overflow-wrap: anywhere; }
.ai-log-row:hover .bt-edit, .ai-doc-row:hover .bt-edit { opacity: 1; }
.ai-doc-ic { width: 32px; height: 32px; flex-shrink: 0; border-radius: 10px; background: var(--surface-3); color: var(--ink-2);
  display: inline-flex; align-items: center; justify-content: center; }
.ai-doc-ic .i { width: 15px; height: 15px; }
.ai-doc-title { font-weight: 600; color: var(--ink); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.ai-doc-host { display: block; margin-top: 2px; font-size: 11.5px; color: var(--ink-3); }

/* the project window's delete, behind its typed name */
.ai-danger { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--border); }
.ai-danger-row { display: flex; gap: 8px; width: 100%; }
.ai-danger-row .input { flex: 1; }

@media (max-width: 640px) {
  .ai-next { flex-wrap: wrap; }
  .ai-next .ai-next-btn { margin-left: 30px; }
  .ai-log-row, .ai-doc-row { padding: 10px; gap: 10px; }
  .ai-log-date { width: 50px; }
}
