/* Scene 1 of the app clone: the conversation, its pills row and the
   composer, drawn after the app's timeline rows, ChatPill and composer. */

.ac-chat { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--sem-color-bg-app); border-radius: 12px 0 0 12px; }
.ac-column { padding-inline: max(16px, calc((100% - 768px) / 2)); }
.ac-transcript { position: relative; flex: 1; min-height: 0; overflow: hidden; padding-top: 52px; display: flex; flex-direction: column; -webkit-mask: linear-gradient(transparent 30px, #000 52px); mask: linear-gradient(transparent 30px, #000 52px); }

/* Each part of the turn arrives with a short rise, as the app's rows do. */
.ac [hidden] { display: none !important; }
.ac-enter { animation: ac-enter 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes ac-enter { from { opacity: 0; transform: translateY(8px); } }

/* The person's message: a small raised box at the right. */
.ac-ask { display: flex; justify-content: flex-end; padding-bottom: var(--sem-space-3xl); }
.ac-bubble { max-width: 76%; padding: var(--sem-space-xs) var(--sem-space-lg); border-radius: var(--sem-radius-control); border: 1px solid var(--sem-color-border-subtle); background: var(--sem-color-bg-hover); font-size: var(--sem-font-size-heading); line-height: 1.6; color: var(--sem-color-text-primary); }

/* The reply: no bubble, the full column. */
.ac-turn { display: flex; flex-direction: column; padding-bottom: var(--sem-space-xl); }
.ac-reply { margin: 5px 0; font-size: var(--sem-font-size-heading); line-height: 1.6; color: var(--sem-color-text-default); }
.ac-turn-meta { margin-top: var(--sem-space-2xs); font-size: var(--sem-font-size-meta); color: var(--sem-color-text-muted); }

/* Folded rows, such as "Thought for 6s" and "Ran 2 commands". */
.ac-fold, .ac-step { display: flex; align-items: center; gap: var(--sem-space-sm); padding: var(--sem-space-xs) var(--sem-space-sm); border-radius: var(--sem-radius-overlay); font-size: var(--sem-font-size-meta); color: var(--sem-color-text-subtle); white-space: nowrap; min-width: 0; }
.ac-fold > svg, .ac-step > svg:first-child { width: 13px; height: 13px; flex: none; color: var(--sem-color-text-disabled); }
.ac-fold > svg:last-child, .ac-step > svg:last-child { width: 13px; height: 13px; flex: none; margin-left: auto; color: var(--sem-color-text-disabled); transition: transform 0.3s; }
.ac-fold.open > svg:last-child { transform: rotate(90deg); }
.ac-fold-preview { overflow: hidden; text-overflow: ellipsis; color: var(--sem-color-text-disabled); min-width: 0; }
.ac-fold .live { display: none; }
.ac-fold.running .live { display: inline; background: linear-gradient(90deg, var(--sem-color-text-subtle) 30%, var(--sem-color-text-primary) 50%, var(--sem-color-text-subtle) 70%) 0 0 / 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: ac-shimmer 1.6s linear infinite; }
.ac-fold.running .done { display: none; }
@keyframes ac-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
.ac-steps { margin-left: var(--sem-space-lg); padding-left: var(--sem-space-xs); border-left: 1px solid var(--sem-color-border-subtle); }
.ac-step-title { color: var(--sem-color-text-subtle); }
.ac-step-path { overflow: hidden; text-overflow: ellipsis; color: var(--sem-color-text-disabled); min-width: 0; }
.ac-step-time { margin-left: auto; font-size: var(--sem-font-size-micro); font-variant-numeric: tabular-nums; color: var(--sem-color-text-subtle); }
.ac-step-time + svg { margin-left: 0 !important; }

/* The inline visual: a well with a small header, holding the drawing. */
.ac-visual { margin: var(--sem-space-lg) 0; border: 1px solid var(--sem-color-border-subtle); border-radius: var(--sem-radius-control); background: var(--sem-color-bg-well); overflow: hidden; }
.ac-visual-head { display: flex; align-items: center; gap: var(--sem-space-xs); height: 24px; padding: 0 var(--sem-space-2xs) 0 var(--sem-space-lg); border-bottom: 1px solid var(--sem-color-border-subtle); font-size: var(--sem-font-size-meta); line-height: 1.25; color: var(--sem-color-text-muted); }
.ac-visual-head svg { width: 13px; height: 13px; }
.ac-visual-body { padding: var(--sem-space-md) var(--sem-space-lg); }

/* The chart the agent drew. Text wears the text inks; only the line is blue. */
.ac-chart-head { display: flex; align-items: flex-end; gap: var(--sem-space-3xl); margin-bottom: var(--sem-space-sm); }
.ac-chart-head > div:first-child { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ac-chart-head b { font-size: var(--sem-font-size-body); font-weight: 600; color: var(--sem-color-text-primary); }
.ac-chart-head span { font-size: var(--sem-font-size-micro); color: var(--sem-color-text-muted); }
.ac-chart-stat { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.ac-chart-stat b { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ac-chart-plot { width: 100%; height: auto !important; overflow: visible; }
.ac-chart-plot text { font-size: 10px; fill: var(--sem-color-text-subtle); font-variant-numeric: tabular-nums; font-family: var(--sem-font-family-ui); }
.ac-chart-plot .g { stroke: var(--sem-color-border-subtle); stroke-width: 1; }
.ac-chart-plot .budget { stroke: var(--sem-color-text-muted); stroke-width: 1; stroke-dasharray: 3 3; }
.ac-chart-plot .budget-label { fill: var(--sem-color-text-muted); }
.ac-line { fill: none; stroke: var(--sem-color-chart-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.8s cubic-bezier(0.45, 0, 0.25, 1); }
.ac-area, .ac-peak { opacity: 0; transition: opacity 0.6s ease; }
.ac-drawn .ac-line { stroke-dashoffset: 0; }
.ac-drawn .ac-area { opacity: 1; transition-delay: 1s; }
.ac-drawn .ac-peak { opacity: 1; transition-delay: calc(0.7s + var(--k) * 0.45s); }
.ac-peak circle { fill: var(--sem-color-chart-1); stroke: var(--sem-color-bg-app); stroke-width: 2; }
.ac-peak text { fill: var(--sem-color-text-default); font-weight: 500; }

/* The pills row floats over the transcript's foot, just above the composer,
   with no band behind it: the transcript runs on beneath it and shows between
   the pills. The pills are calm. Each has a neutral fill and hairline, its
   hue only in its glyph, its words in text ink and its count in muted ink.
   Their fill is opaque, so the text beneath them does not show through. */
.ac-transcript { padding-bottom: 36px; }
.ac-dock { position: relative; flex: none; padding-top: var(--sem-space-2xs); padding-bottom: var(--sem-space-xl); }
.ac-pills { position: relative; z-index: 2; display: flex; align-items: center; gap: var(--sem-space-xs); min-height: 28px; margin: -34px 0 var(--sem-space-sm); white-space: nowrap; }
.ac-pill { height: 28px; box-sizing: border-box; display: inline-flex; align-items: center; gap: var(--sem-space-xs); padding: 0 10px 0 6px; border-radius: var(--sem-radius-pill); border: 1px solid var(--sem-color-border-default); background: var(--sem-color-bg-hover); font-size: var(--sem-font-size-meta); color: var(--sem-color-text-primary); }
.ac-pill b { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--sem-color-text-muted); }
.ac-pill code { font-family: var(--sem-font-family-mono); font-size: var(--sem-font-size-micro); }
.ac-pill-glyph { width: 16px; height: 16px; flex: none; color: var(--pill); }
.ac-pill-logos { display: flex; }
.ac-pill-logos i { width: 16px; height: 16px; border-radius: 50%; background: var(--sem-color-bg-surface-raised); box-shadow: 0 0 0 1px var(--sem-color-bg-hover); display: grid; place-items: center; }
.ac-pill-logos i + i { margin-left: -6px; }
.ac-pill-logos svg { width: 11px; height: 11px; }
.ac-ring circle { transition: stroke-dasharray 0.6s ease; }
.ac-pills-gap { flex: 1; }
.ac-pill-min { width: 28px; height: 28px; box-sizing: border-box; flex: none; border-radius: 50%; border: 1px solid var(--sem-color-border-default); background: var(--sem-color-bg-app); color: var(--sem-color-text-muted); display: grid; place-items: center; }
.ac-pill-min svg { width: 13px; height: 13px; }

/* MCP and Skills say what the chat can use, so they are not pills. They are
   quiet grey buttons beside the composer's "+", with a glyph, a word and a
   count, all in muted ink. */
.ac-tool { height: 30px; display: inline-flex; align-items: center; gap: 6px; padding: 0 var(--sem-space-sm); border-radius: var(--sem-radius-control); font-size: var(--sem-font-size-meta); color: var(--sem-color-text-muted); white-space: nowrap; }
.ac-tool > i { width: 16px; height: 16px; flex: none; }
.ac-tool b { font-weight: 400; font-variant-numeric: tabular-nums; }

/* The composer: a lifted, rounded tray with the field and a row of controls. */
.ac-composer { border-radius: var(--sem-radius-composer); border: 1px solid var(--sem-color-border-default); background: linear-gradient(var(--sem-color-bg-hover), color-mix(in oklab, var(--sem-color-bg-hover) 55%, var(--sem-color-bg-app))); box-shadow: var(--sem-shadow-control-raised); }
.ac-field { min-height: 40px; padding: var(--sem-space-xl) var(--sem-space-2xl) var(--sem-space-2xs); line-height: 20px; font-size: var(--sem-font-size-meta); }
.ac-placeholder { color: var(--sem-color-text-disabled); }
.ac-composer-row { display: flex; align-items: center; gap: var(--sem-space-xs); padding: var(--sem-space-xs) var(--sem-space-md) var(--sem-space-md); }
.ac-plus { width: 30px; height: 30px; border-radius: var(--sem-radius-control); display: grid; place-items: center; color: var(--sem-color-text-muted); }
.ac-plus svg { width: 16px; height: 16px; }
.ac-grow { flex: 1; }
.ac-model { white-space: nowrap; flex: none; height: 26px; display: inline-flex; align-items: center; gap: var(--sem-space-xs); padding: 0 var(--sem-space-sm); border-radius: var(--sem-radius-control); font-size: var(--sem-font-size-meta); color: var(--sem-color-text-muted); }
.ac-model-logo, .ac-caret { width: 13px; height: 13px; flex: none; }
.ac-effort, .ac-caret { color: var(--sem-color-text-subtle); }
.ac-send { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--sem-color-bg-active); color: var(--sem-color-text-subtle); }
.ac-send svg { width: 16px; height: 16px; }

/* In the light theme the composer is white, told apart by its hairline. */
.ac[data-mode='light'] .ac-win .ac-composer { background: #ffffff; }
