/* tools/connect.html — Connect: your own AI, reaching our tools. Short and plain. */

.t-connect .cx-hero { padding: var(--space-12) 0 var(--space-16); }
.t-connect .cx-hero__top { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--space-6) var(--space-12); align-items: end; }
.t-connect .cx-id { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; }
.t-connect .cx-id .app-ico { width: 40px; height: 40px; border-radius: 11px; background: var(--carmine-soft); color: var(--carmine); }
.t-connect .cx-id .app-ico svg { width: 18px; height: 18px; }
.t-connect .cx-id b { display: block; font-size: 15px; font-weight: 600; color: var(--ink); }
.t-connect .cx-id small { display: block; font: 500 10.5px/1.3 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.t-connect .cx-hero h1 { margin: 0; }
.t-connect .cx-hero__side { display: grid; gap: var(--space-6); padding-bottom: 10px; }

/* The scene: a chat on the left, the screens it read on the right */
.t-connect .cx-scene { position: relative; margin-top: var(--space-12); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr) minmax(0, 1fr); gap: var(--space-8); align-items: center;
  padding: var(--space-12); border-radius: var(--radius-xl); background: var(--surface-sunk); }
.t-connect .cx-ai { width: 22px; height: 22px; display: inline-grid; place-items: center; flex: none; border-radius: 50%; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-style: normal; }
.t-connect .cx-ai svg { width: 13px; height: 13px; }
.t-connect .cx-ai--chatgpt { background: #121211; border-color: #121211; }
.t-connect .cx-ai--claude { background: #faf0eb; border-color: #f1ddd2; }

.t-connect .cx-chat { position: relative; z-index: 1; display: grid; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-window); overflow: hidden; }
.t-connect .cx-chat__bar { display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 18px; border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--ink); }
.t-connect .cx-chat__bar b { font-weight: 600; }
.t-connect .cx-chat__dots { display: flex; gap: 6px; }
.t-connect .cx-chat__dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.t-connect .cx-chat__model { display: flex; margin-left: auto; }
.t-connect .cx-chat__model .cx-ai + .cx-ai { margin-left: -6px; }
.t-connect .cx-chat__body { display: grid; gap: 22px; padding: 26px 26px 10px; }
.t-connect .cx-msg { font-size: 15.5px; line-height: 1.55; color: var(--ink); }
.t-connect .cx-msg--me { justify-self: end; max-width: 78%; padding: 12px 16px; border-radius: 18px 18px 4px 18px; background: var(--surface-sunk); }
.t-connect .cx-msg--ai { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px; align-items: start; }
.t-connect .cx-msg--ai > div { display: grid; gap: 10px; }
.t-connect .cx-avatar .cx-ai { width: 30px; height: 30px; }
.t-connect .cx-avatar .cx-ai svg { width: 16px; height: 16px; }
.t-connect .cx-used { display: flex; flex-wrap: wrap; gap: 6px; }
.t-connect .cx-used > span { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px 0 4px; border-radius: var(--radius-pill); border: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.t-connect .cx-mini { width: 20px; height: 20px; border-radius: 6px; flex: none; margin: 0; box-shadow: none; }
.t-connect .cx-mini svg { width: 12px; height: 12px; }
.t-connect .cx-list { margin: 0; padding: 0 0 0 18px; display: grid; gap: 4px; }
.t-connect .cx-list li::marker { color: var(--carmine); }
.t-connect .cx-list b, .t-connect .cx-msg b { font-weight: 600; }
.t-connect .cx-sugg { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.t-connect .cx-sugg span { height: 32px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: var(--radius-pill); border: 1px solid var(--line-strong); font-size: 13px; color: var(--ink); }
.t-connect .cx-chat__input { display: flex; align-items: center; justify-content: space-between; margin: 16px 20px 20px; padding: 0 8px 0 18px; height: 50px; border-radius: var(--radius-pill); border: 1px solid var(--line-strong); font-size: 14.5px; color: var(--muted); }
.t-connect .cx-chat__input i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--paper); }
.t-connect .cx-chat__input svg { width: 15px; height: 15px; }

/* The screens it read, joined to the chat by a dotted thread */
.t-connect .cx-side { position: relative; display: grid; gap: var(--space-4); }
.t-connect .cx-app { position: relative; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: 0 14px 30px -20px rgba(18,18,17,.35); overflow: hidden; }
.t-connect .cx-app__bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.t-connect .cx-app__bar b { font-weight: 600; color: var(--ink); }
.t-connect .cx-app__bar > span:last-child { margin-left: auto; font: 500 10.5px/1 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.t-connect .cx-app__rows { margin: 0; padding: 4px 0; list-style: none; }
.t-connect .cx-app__rows li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 14px; font-size: 13px; color: var(--muted); }
.t-connect .cx-app__rows li.is-hit { color: var(--ink); background: color-mix(in srgb, var(--carmine-soft) 55%, transparent); }
.t-connect .cx-app__rows em { font-style: normal; font-weight: 500; color: var(--carmine); white-space: nowrap; }
.t-connect .cx-app__rows em.ok { color: var(--ok); }
.t-connect .cx-app--l { transform: translateY(-18%); }
.t-connect .cx-app--r { transform: translateY(18%); }
.t-connect .cx-app--l::after, .t-connect .cx-app--r::after { content: ""; position: absolute; top: 50%; width: var(--space-8); border-top: 1.5px dashed var(--line-strong); }
.t-connect .cx-app--l::after { left: 100%; }
.t-connect .cx-app--r::after { right: 100%; }
.t-connect .cx-app { overflow: visible; }
.t-connect .cx-app__bar { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.t-connect .cx-app__rows { border-radius: 0 0 var(--radius-lg) var(--radius-lg); overflow: hidden; }
.t-connect .cx-side__note { margin-top: var(--space-4); text-align: center; font-size: 13px; color: var(--muted); }

.t-connect .cx-works { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 28px; margin-top: var(--space-8); font-size: 14.5px; color: var(--ink); }
.t-connect .cx-works > span { font: 500 11px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.t-connect .cx-works b { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.t-connect .cx-works .cx-ai { width: 30px; height: 30px; }
.t-connect .cx-works .cx-ai svg { width: 16px; height: 16px; }

/* Three steps, four rules */
.t-connect .cx-steps, .t-connect .cx-rules { margin: 0; padding: 0; list-style: none; display: grid; gap: var(--space-8); }
.t-connect .cx-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--ink); }
.t-connect .cx-steps li { display: grid; gap: 8px; padding-top: var(--space-6); }
.t-connect .cx-steps small { font: 500 11px/1 var(--font-mono); color: var(--carmine); }
.t-connect .cx-steps b, .t-connect .cx-rules b { font-size: 20px; font-weight: 600; letter-spacing: -0.015em; color: var(--ink); }
.t-connect .cx-steps p, .t-connect .cx-rules p { font-size: 15.5px; line-height: 1.5; color: var(--ink-2); max-width: 36ch; }
.t-connect .cx-rules { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); }
.t-connect .cx-rules li { display: grid; gap: 8px; align-content: start; padding: 24px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--line); }
.t-connect .cx-rules b { font-size: 18px; }
.t-connect .feature__head .lead a { color: var(--ink); }

.t-connect .cx-close { padding: var(--section) 0; margin-top: var(--space-16); border-top: 1px solid var(--line); }
.t-connect .cx-close__in { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--space-12); align-items: end; }
.t-connect .cx-close .display-l { margin: 0; }
.t-connect .cx-close__side { display: grid; gap: var(--space-6); }

@media (max-width: 1100px) { .t-connect .cx-rules { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 960px) {
  .t-connect .cx-hero { padding-top: var(--space-8); }
  .t-connect .cx-hero__top, .t-connect .cx-close__in { grid-template-columns: minmax(0, 1fr); }
  .t-connect .cx-scene { grid-template-columns: minmax(0, 1fr); padding: var(--space-4); }
  .t-connect .cx-chat { order: -1; }
  .t-connect .cx-app--l, .t-connect .cx-app--r { transform: none; }
  .t-connect .cx-app--l::after, .t-connect .cx-app--r::after { display: none; }
  .t-connect .cx-steps { grid-template-columns: minmax(0, 1fr); gap: var(--space-6); }
}
@media (max-width: 560px) {
  .t-connect .cx-chat__body { padding: 18px 16px 6px; }
  .t-connect .cx-msg--me { max-width: 92%; }
  .t-connect .cx-msg--ai { grid-template-columns: minmax(0, 1fr); }
  .t-connect .cx-avatar { display: none; }
  .t-connect .cx-rules { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 961px) and (max-width: 1180px) {
  .t-connect .cx-scene { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .t-connect .cx-chat { grid-column: 1 / -1; order: -1; max-width: 760px; width: 100%; justify-self: center; }
  .t-connect .cx-app--l, .t-connect .cx-app--r { transform: none; }
  .t-connect .cx-app--l::after, .t-connect .cx-app--r::after { display: none; }
}
