/* The agent's own page (web/agent.js, BB-75; Andrii, 21.11.2026: «секцію з агентом на всю сторінку, і щоб по
   інтерфейсу було дуже схоже на claude code»). The talk's own rules are .ask-log, .ask-msg of app.css; this file is
   the arrangement of a whole page around it: the earlier talks on the left, the talk as a narrow column in the
   middle, one large field with its buttons inside. Every colour is a token, so the themes, the dark look and the
   autopilot's glass reach the page by themselves. Classes are «agp-…» («ag-…» is the agency's). */
.agp { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); position: relative; min-height: 0; }
.agp.side-on { grid-template-columns: 268px minmax(0, 1fr); }

/* ── earlier talks ─────────────────────────────────────────────────────────────────────────────── */
.agp-side { display: none; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid var(--border); background: var(--bg-muted); }
.agp.side-on .agp-side { display: flex; }
.agp-side-h { display: flex; align-items: center; gap: 2px; padding: 12px 10px 6px 16px; flex: none; }
.agp-side-h .over { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agp-list { flex: 1; min-height: 0; overflow-y: auto; padding: 2px 8px 16px; display: flex; flex-direction: column; gap: 1px; }
.agp-chat { display: flex; align-items: center; gap: 2px; padding-right: 4px; border-radius: var(--r-md); flex: none; transition: background var(--fast); }
.agp-chat:hover, .agp-chat:focus-within { background: color-mix(in srgb, var(--fg) 5%, transparent); }
.agp-chat.on { background: color-mix(in srgb, var(--fg) 8%, transparent); }
/* one line: the name, cut where it must, and how long ago beside it */
.agp-chat-b { flex: 1; min-width: 0; padding: 7px 8px; display: flex; align-items: baseline; gap: 8px; border-radius: var(--r-md); text-align: left; }
.agp-chat-t { flex: 1; min-width: 0; font-size: 13px; line-height: 18px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agp-chat.on .agp-chat-t { font-weight: 600; }
.agp-chat small { flex: none; font-size: 11.5px; line-height: 15px; color: var(--fg-subtle); white-space: nowrap; }
/* the pencil and the cross are there for the row under the pointer or the keys; where nothing hovers it is always there, quiet */
.agp-chat-x { opacity: 0; }
.agp-chat:hover .agp-chat-x, .agp-chat:focus-within .agp-chat-x { opacity: 1; }
@media (hover: none) { .agp-chat-x { opacity: .55; } }
.agp-none { padding: 6px 8px; }
.agp-list > .stack { padding: 8px; }
.agp-scrim { display: none; }

/* ── the talk ──────────────────────────────────────────────────────────────────────────────────── */
.agp-main { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
/* the corner: the list of earlier talks while it is off the screen, and a new talk once something is said */
.agp-bar { order: -1; flex: none; display: flex; gap: 2px; min-height: 40px; padding: 8px 12px 0; }
.agp.side-on .agp-bar { display: none; }
.agp.agp-home .agp-bar-new { display: none; }
/* incognito stands on the right of the corner, where Claude has it; while it is on, the button is filled */
.agp-bar-incog { margin-left: auto; }
.agp.agp-incog .agp-bar-incog { background: var(--ink); color: var(--cream); }
.agp.agp-incog .agp-bar-incog:hover { background: color-mix(in srgb, var(--ink) 86%, var(--paper)); }
/* nothing said yet: the greeting, the field and the ideas stand together a little above the middle; on a low screen
   the two empty stretches give way first and the page scrolls, so nothing is cut off at the top */
.agp.agp-home .agp-main { overflow-y: auto; }
.agp.agp-home .agp-main::before { content: ''; flex: 1 1 0; min-height: 8px; }
.agp.agp-home .agp-main::after { content: ''; flex: 1.6 1 0; min-height: 16px; }
.agp.agp-home .ask-log, .agp.agp-talk .agp-hero, .agp.agp-talk .agp-ideas { display: none; }
.agp-hero { flex: none; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 0 24px; margin-bottom: 26px; }
.agp-hero .neuron { width: 44px; height: 44px; flex: none; color: var(--fg-muted); }
.agp-incog-mark { display: none; color: var(--fg-muted); }
.agp-incog-mark svg { width: 40px; height: 40px; stroke-width: 1.5; }
.agp.agp-incog .agp-hero .neuron { display: none; }
.agp.agp-incog .agp-incog-mark { display: inline-flex; }
/* incognito, nothing said yet: one quiet line under the greeting says what the mode does */
.agp-incog-note { display: none; flex: none; max-width: 560px; margin: -14px auto 24px; padding: 0 24px; text-align: center; font-size: 14px; line-height: 1.55; color: var(--fg-subtle); }
.agp.agp-incog.agp-home .agp-incog-note { display: block; }
.agp-hello { font-size: 34px; line-height: 1.15; font-weight: 600; letter-spacing: -.03em; min-width: 0; overflow-wrap: anywhere; }

/* the log: the same column as the field, the person's words in a soft box, the agent's as plain text */
.agp .ask-log { flex: 1; min-height: 0; overflow-y: auto; background: transparent; gap: 18px; padding: 12px max(24px, calc((100% - 760px) / 2)) 28px; }
.agp .ask-msg { max-width: 100%; font-size: 14.5px; line-height: 1.65; }
.agp .ask-msg.me { max-width: min(82%, 560px); padding: 10px 16px; border-radius: 18px; border-bottom-right-radius: 6px; background: var(--n95); color: var(--fg); }
.agp .ask-msg.ai { padding: 0 2px; border: 0; border-radius: 0; background: none; }
.agp .ask-msg.me .att { background: var(--paper); border-color: var(--border); color: var(--fg-muted); }
/* the agent at work: what is done as quiet lines, what it does now as its line of work (workLine of ui.js) */
.agp .ask-wait { display: flex; flex-direction: column; gap: 6px; }
.agp .ask-steps { gap: 4px; }
.agp .ask-steps:not(:empty) { margin-top: 0; }
.agp .ask-step { display: flex; align-items: baseline; gap: 8px; font-size: 13px; line-height: 18px; }
.agp .ask-step::before { content: ''; flex: none; width: 5px; height: 5px; margin: 0 7.5px 1px; border-radius: 50%; background: var(--fg-faint); align-self: center; }
.agp .ask-step.was { color: var(--fg-subtle); }
.agp .wl { font-size: 13.5px; }

/* the field: one box, the text on top, the buttons inside under it */
.agp-in { flex: none; width: 100%; max-width: 808px; margin: 0 auto; padding: 0 24px 16px; }
.agp-box { display: flex; flex-direction: column; gap: 8px; padding: 14px 12px 10px 18px; border: 1px solid var(--border-strong); border-radius: 20px; background: var(--paper); box-shadow: var(--shadow-sm); cursor: text; transition: border-color var(--fast), box-shadow var(--fast); }
/* incognito: the field's edge is dashed for as long as the mode is on, in the talk too */
.agp.agp-incog .agp-box { border-style: dashed; }
.agp-box:focus-within { border-color: color-mix(in srgb, var(--fg) 42%, var(--border-strong)); box-shadow: var(--shadow-md); }
.agp-box textarea { display: block; width: 100%; min-height: 26px; max-height: 260px; padding: 0; border: 0; outline: 0; resize: none; background: transparent; font-size: 15px; line-height: 1.55; }
.agp.agp-home .agp-box textarea { min-height: 50px; }
.agp-box textarea::placeholder { color: var(--fg-faint); }
.agp-box .att-row { padding: 0 0 4px; border-top: 0; background: transparent; }
.agp-tools { display: flex; align-items: center; gap: 6px; margin-left: -8px; cursor: default; }
.agp-send { flex: none; width: 34px; height: 34px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--ink); color: var(--cream); opacity: .32; transition: opacity var(--fast), transform var(--fast) var(--enter); }
.agp-send svg { width: 17px; height: 17px; }
.agp-send.lit { opacity: 1; }
.agp-send.lit:active { transform: scale(.94); }
.agp-send.busy { opacity: .32; cursor: default; }
/* under the field: whose brain the agent reads, and that no letter leaves without a yes */
.agp-under { display: flex; flex-wrap: wrap; gap: 4px 18px; padding: 10px 8px 0 18px; font-size: 12.5px; line-height: 18px; color: var(--fg-subtle); }
.agp-fact { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 100%; }
.agp-fact svg { width: 14px; height: 14px; flex: none; }
.agp-fact span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agp-fact.off { color: var(--warn-fg); }
.agp-fact.incog { color: var(--fg-muted); font-weight: 500; }

/* what to start with: a quiet list, one line each */
/* what to connect or add next, one line each (BB-130, after Claude Code's start screen): the action in ink, why in grey */
.grow-connect { margin-top: 14px; border: 1px solid var(--border); border-radius: var(--r-xl); padding: 4px; background: var(--paper); }
.grow-conn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 14px; border-radius: var(--r-lg); font-size: 14px; line-height: 20px; text-align: left; min-width: 0; transition: background var(--fast); }
.grow-conn:hover { background: color-mix(in srgb, var(--fg) 5%, transparent); }
.grow-conn svg { width: 17px; height: 17px; flex: none; color: var(--fg); }
.grow-conn-a { flex: none; font-weight: 500; }
.grow-conn-w { min-width: 0; color: var(--fg-subtle); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.agp.agp-talk .grow-connect, .agp.agp-incog .grow-connect { display: none; }
@media (max-width: 560px) { .grow-conn { flex-wrap: wrap; row-gap: 0; } .grow-conn-w { flex-basis: calc(100% - 29px); margin-left: 29px; white-space: normal; } }
.agp-ideas { flex: none; width: 100%; max-width: 808px; margin: 20px auto 0; padding: 0 24px; }
.agp-ideas-h { padding: 0 18px 6px; font-size: 12.5px; line-height: 18px; color: var(--fg-subtle); }
.agp-idea { display: flex; align-items: center; gap: 14px; width: 100%; padding: 10px 18px; border-radius: var(--r-xl); font-size: 14.5px; line-height: 20px; transition: background var(--fast); }
.agp-idea:hover { background: color-mix(in srgb, var(--fg) 5%, transparent); }
.agp-idea svg { width: 18px; height: 18px; flex: none; color: var(--fg-subtle); }
.agp-idea span { min-width: 0; }

/* a file held over the page */
.agp.dropping::after { content: ''; position: absolute; inset: 10px; z-index: 8; border: 2px dashed var(--border-strong); border-radius: var(--r-2xl); background: color-mix(in srgb, var(--paper) 70%, transparent); pointer-events: none; }

/* ── a narrower screen: the earlier talks lie over the talk when asked for ─────────────────────── */
@media (max-width: 1180px) {
  .agp.side-on { grid-template-columns: minmax(0, 1fr); }
  .agp.side-on .agp-side { display: none; }
  .agp.side-on .agp-bar { display: flex; }
  .agp.side-over .agp-side { display: flex; position: absolute; inset: 0 auto 0 0; z-index: 6; width: min(300px, 86%); background: var(--paper); box-shadow: var(--shadow-xl); animation: fade var(--base) var(--enter) both; }
  .agp.side-over .agp-scrim { display: block; position: absolute; inset: 0; z-index: 5; background: color-mix(in srgb, var(--ink) 22%, transparent); animation: fade var(--base) both; }
  :root[data-mode="dark"] .agp.side-over .agp-scrim { background: rgba(0, 0, 0, .5); }
}
@media (max-width: 640px) {
  .agp-hero { flex-direction: column; gap: 10px; margin-bottom: 20px; text-align: center; }
  .agp-hero .neuron { width: 38px; height: 38px; }
  .agp-hello { font-size: 25px; }
  .agp-in, .agp-ideas { padding-left: 12px; padding-right: 12px; }
  .agp-in { padding-bottom: 10px; }
  .agp .ask-log { padding-left: 14px; padding-right: 14px; }
  .agp .ask-msg.me { max-width: 88%; }
  /* (16 px: a phone's browser zooms into a field with smaller letters) */
  .agp-box textarea { font-size: 16px; }
  .agp-idea { padding: 10px 12px; gap: 12px; }
  .agp-ideas-h { padding-left: 12px; }
  .agp-under { padding-left: 12px; }
  /* a talk on a phone: the two quiet lines under the field give their room to the talk (not the one that says the agent is off) */
  .agp.agp-talk .agp-under:not(.warn) { display: none; }
  /* …except in incognito: the line that names the mode stays, alone */
  .agp.agp-incog.agp-talk .agp-under { display: flex; }
  .agp.agp-incog.agp-talk .agp-under .agp-fact:not(.incog):not(.off) { display: none; }
  .agp-incog-mark svg { width: 34px; height: 34px; }
  .agp-incog-note { margin-top: -10px; padding: 0 16px; }
}

/* ── a change of the product at work, under the agent's answer that started it (BB-127, web/changes.js) ──────────────
   Claude Code's arrangement (a dot a step, «⎿» for what came of it, a diff with the numbers of its lines, a turning star
   with a word, the seconds and the tokens), our type and colours. The answer is pre-wrap text: the block is not. */
.cl { margin-top: 14px; white-space: normal; font-size: 13.5px; line-height: 1.55; overflow-wrap: anywhere; }
.cl-log { display: flex; flex-direction: column; gap: 9px; }
.cl-row { display: grid; grid-template-columns: 14px minmax(0, 1fr); column-gap: 8px; align-items: start; animation: rise var(--base) var(--enter) both; }
.cl-dot { width: 7px; height: 7px; border-radius: 50%; margin: 7px 0 0 3px; background: var(--success); }
.cl-say .cl-dot { background: var(--fg); }
.cl-err .cl-dot { background: var(--error); }
.cl-off .cl-dot, .cl-round .cl-dot { background: var(--fg-faint); }
.cl-run .cl-dot { background: var(--fg-subtle); animation: cl-blink 1.1s ease-in-out infinite; }
@keyframes cl-blink { 50% { opacity: .2; } }
.cl-body { min-width: 0; }
.cl-say { white-space: pre-wrap; color: var(--fg); }
.cl-say b { font-weight: 600; }
.cl-say code { padding: 0 4px; border-radius: 4px; background: var(--n95); font: 12.5px/1.5 var(--mono); }
.cl-head { font: 400 12.5px/1.65 var(--mono); color: var(--fg); }
.cl-head b { font-weight: 650; }
.cl-path { color: var(--fg-muted); }
.cl-out { display: flex; gap: 8px; margin-top: 1px; font-size: 12.5px; line-height: 1.5; color: var(--fg-subtle); }
.cl-hook { flex: none; font-family: var(--mono); color: var(--fg-faint); }
.cl-err .cl-out { color: var(--error-fg); }
.cl-muted { color: var(--fg-subtle); }
.cl-fold { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; max-width: 100%; color: var(--fg-muted); border-radius: 4px; }
.cl-fold:hover { color: var(--fg); }
.cl-fold:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.cl-key { display: inline-flex; color: var(--fg-faint); }
.cl-key svg { width: 13px; height: 13px; }
.cl-bad { color: var(--error-fg); white-space: nowrap; }
.cl-list { display: flex; flex-direction: column; gap: 2px; margin-top: 5px; padding-left: 10px; border-left: 1px solid var(--border); }
.cl-li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 12.5px; }
.cl-li .cl-head { min-width: 0; }
.cl-li-n { flex: none; color: var(--fg-subtle); font-size: 12px; }
.cl-li.err, .cl-li.err .cl-li-n { color: var(--error-fg); }
.cl-diff { margin-top: 6px; padding: 4px 0; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg-subtle); font: 12px/1.6 var(--mono); overflow: hidden; }
.cl-dl { display: grid; grid-template-columns: 3.4em 1.5em minmax(0, 1fr); }
.cl-dn { padding-right: 7px; text-align: right; color: var(--fg-faint); user-select: none; font-variant-numeric: tabular-nums; }
.cl-dm { color: var(--fg-faint); user-select: none; }
.cl-dt { padding-right: 10px; white-space: pre-wrap; color: var(--fg-muted); }
.cl-dl.add { background: color-mix(in srgb, var(--success) 15%, transparent); }
.cl-dl.del { background: color-mix(in srgb, var(--error) 12%, transparent); }
.cl-dl.add .cl-dt, .cl-dl.del .cl-dt { color: var(--fg); }
.cl-dl.add .cl-dm { color: var(--success-fg); }
.cl-dl.del .cl-dm { color: var(--error-fg); }
.cl-dl mark { color: inherit; border-radius: 2px; }
.cl-dl.add mark { background: color-mix(in srgb, var(--success) 40%, transparent); }
.cl-dl.del mark { background: color-mix(in srgb, var(--error) 34%, transparent); }
.cl-gap .cl-dt { color: var(--fg-faint); font-family: var(--font); font-size: 11.5px; }
.cl-cut { font-size: 12px; color: var(--fg-faint); }
.cl-now { display: flex; align-items: baseline; gap: 6px; margin-top: 12px; font-size: 13px; }
.cl-now:empty { display: none; }
.cl-star { flex: none; width: 14px; text-align: center; font-family: var(--mono); color: var(--spot); }
.cl-word { color: var(--spot); font-weight: 500; }
.cl-meta { color: var(--fg-subtle); font-variant-numeric: tabular-nums; }
.cl-star.done, .cl-star.done + .cl-word { color: var(--fg-subtle); font-weight: 400; }
.cl-foot { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding-top: 9px; border-top: 1px dashed var(--border); font-size: 12.5px; }
.cl-foot:empty { display: none; }
.cl-link { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; color: var(--fg-subtle); border-radius: 4px; }
.cl-link:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; }
.cl-link:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.cl-link svg { width: 13px; height: 13px; }
.cl-state { color: var(--fg-faint); }
@media (prefers-reduced-motion: reduce) { .cl-row { animation: none; } .cl-run .cl-dot { animation: none; } }
@media (max-width: 640px) {
  .cl-dl { grid-template-columns: 2.8em 1.3em minmax(0, 1fr); }
  .cl-li { flex-wrap: wrap; gap: 0 10px; }
}
/* how a change will look (BB-132, web/changes.js changeShots): a picture of the demo project in a quiet frame; a phone narrower */
.chg-shot { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--paper); }
.chg-shot a { display: block; }
.chg-shot img { display: block; width: 100%; height: auto; }
.chg-shot.phone { max-width: 240px; margin: 0 auto; border-radius: var(--r-2xl); }
