/*
 * Chat art: a conversation with an atomicAds agent on a forest gradient.
 * Shared by every chat-style image (hero and section art); played by chat.js.
 *
 * Layout: .col is the conversation box, laid out 1/0.9 larger than the space
 * it fills and scaled to 90%. Each page sets .col's position and size; the
 * rest (bubble, answer card, composer) is here.
 */
.forest { position: absolute; inset: 0; background: #032b20 center / cover; }
.forest[data-bg='diagonal'] { background-image: url('bg/diagonal.jpg'); }
.forest[data-bg='halo'] { background-image: url('bg/halo.jpg'); }
.forest[data-bg='dual-flow'] { background-image: url('bg/dual-flow.jpg'); }
.forest[data-bg='crest'] { background-image: url('bg/crest.jpg'); }
.forest[data-bg='rise'] { background-image: url('bg/rise.jpg'); }
.forest[data-bg='sweep'] { background-image: url('bg/sweep.jpg'); }
.forest[data-bg='wave'] { background-image: url('bg/wave.jpg'); }

.col { position: absolute; transform: scale(0.9); transform-origin: 0 0; display: flex; flex-direction: column; gap: 12px; }

.me { align-self: flex-end; max-width: 86%; padding: 11px 15px; border-radius: 18px 18px 6px 18px; background: rgb(255 255 255 / 0.96); color: var(--fg); font-size: 14.5px; line-height: 21px; box-shadow: 0 12px 28px -16px rgb(0 24 14 / 0.55); }

.answer { background: #fff; border-radius: 20px; padding: 15px 16px 16px; box-shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 28px 56px -22px rgb(0 24 14 / 0.6); display: flex; flex-direction: column; gap: 12px; }
.who { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 500; }
.who-av { width: 26px; height: 26px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: var(--primary); color: #fff; flex-shrink: 0; }
.who-av svg { width: 14px; height: 14px; }
.who .card-sub { font-weight: 400; }
.say { font-size: 14px; line-height: 21px; color: var(--fg); }
.say .muted { color: var(--muted); }
.say b { font-weight: 500; }

.steps { display: flex; flex-wrap: wrap; gap: 6px; }
.step { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px 0 7px; border-radius: 999px; background: var(--tint); border: 1px solid var(--border); font-size: 12px; font-weight: 500; color: var(--fg); }
.step i { width: 15px; height: 15px; border-radius: 99px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; background: var(--ok); color: #fff; }
.step.err { border-color: var(--err-line); background: var(--err-bg); color: var(--err); }
.step.err i { background: var(--err); }
.step.warn { border-color: var(--warn-line); background: var(--warn-bg); color: var(--warn); }
.step.warn i { background: var(--warn); }
.step svg { width: 9px; height: 9px; }
.step .spin { display: none; width: 13px; height: 13px; border-radius: 99px; border: 1.5px solid var(--border); border-top-color: var(--primary); animation: spin 0.7s linear infinite; }
.step.running i { display: none; }
.step.running .spin { display: inline-block; }
.step.running { color: var(--muted); border-color: var(--border); background: #fff; }
@keyframes spin { to { rotate: 360deg; } }

/* Result block inside an answer. */
.result { border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.r-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: linear-gradient(180deg, #fafaf9, #fff); border-bottom: 1px solid var(--border); }
.r-title { font-size: 14.5px; font-weight: 500; letter-spacing: -0.2px; }
.r-sub { margin-top: 2px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.r-sub img { width: 13px; height: 13px; }
.ring { position: relative; width: 54px; height: 54px; flex-shrink: 0; }
.ring svg { width: 54px; height: 54px; rotate: -90deg; }
.ring b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 600; letter-spacing: -0.3px; }
.ring .arc { transition: stroke-dashoffset 1.2s cubic-bezier(0.22, 1, 0.36, 1); }
.tiles { display: grid; grid-auto-columns: 1fr; grid-auto-flow: column; border-bottom: 1px solid var(--border); }
.tile { padding: 9px 14px; border-left: 1px solid var(--border); }
.tile:first-child { border-left: 0; }
.tile .n { font-size: 19px; font-weight: 500; letter-spacing: -0.4px; }
.tile .l { font-size: 11.5px; color: var(--muted); }
.issue { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.issue:last-child { border-bottom: 0; }
/* Severity tiles: in issue rows, and anywhere else (e.g. a result header). */
.sev { width: 24px; height: 24px; border-radius: 7px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sev svg { width: 13px; height: 13px; }
.sev.err { background: var(--err-bg); color: var(--err); }
.sev.warn { background: var(--warn-bg); color: var(--warn); }
.sev.ok { background: var(--ok-bg); color: var(--ok); }
.sev.file { background: var(--tint); color: var(--muted); border: 1px solid var(--border); }
.issue .txt { flex: 1; min-width: 0; }
.issue .txt small { display: block; font-size: 11.5px; color: var(--muted); }
.issue .tags { display: flex; gap: 3px; flex-shrink: 0; }
.r-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; background: var(--tint); border-top: 1px solid var(--border); }
.r-foot .card-sub { font-size: 12px; }

/* Composer, LLM style. The full one (hero) has a toolbar row; .slim is one line. */
.composer { background: #fff; border-radius: 20px; padding: 14px 14px 12px 18px; box-shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 24px 48px -20px rgb(0 24 14 / 0.6); }
.composer .text { min-height: 24px; font-size: 15px; line-height: 24px; color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.composer .ph { color: #a8a29e; }
.composer .caret { display: none; width: 1.5px; height: 18px; margin-left: 1px; vertical-align: -3px; background: var(--primary); animation: blink 1s steps(1) infinite; }
.typing .composer .caret { display: inline-block; }
.tools { display: flex; align-items: center; gap: 8px; margin-top: 14px; }
.tool { width: 32px; height: 32px; border-radius: 10px; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--muted); }
.tool svg, .agent svg { width: 15px; height: 15px; }
.agent { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 11px 0 9px; border-radius: 10px; background: var(--primary-10); color: var(--primary); font-size: 13px; font-weight: 500; flex-shrink: 0; }
.agent .chev { width: 13px; height: 13px; opacity: 0.7; }
.send { margin-left: auto; width: 34px; height: 34px; border-radius: 11px; background: var(--primary); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; transition: transform 0.15s, opacity 0.3s; }
.send svg { width: 16px; height: 16px; }
.send.idle { opacity: 0.35; }
.send.press { transform: scale(0.86); }
.composer.slim { display: flex; align-items: center; gap: 10px; padding: 9px 9px 9px 16px; border-radius: 16px; }
.composer.slim .text { flex: 1; min-width: 0; font-size: 14px; }
@keyframes blink { 50% { opacity: 0; } }

/* Live playback (chat.js): pieces wait hidden until revealed. Result rows take
   no room until they arrive, so an answer grows like a streamed reply. */
.live [data-s], .live [data-step], .live [data-r] { transition: opacity 0.45s, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
.live [data-hide] { opacity: 0; transform: translateY(12px); }
.live .result [data-r] { max-height: 120px; overflow: hidden; transition: opacity 0.45s, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), max-height 0.45s cubic-bezier(0.22, 1, 0.36, 1), padding 0.45s; }
.live .result [data-r][data-hide] { max-height: 0; padding-top: 0; padding-bottom: 0; border-bottom-width: 0; }
.live [data-fill] { transition: width 1.1s cubic-bezier(0.22, 1, 0.36, 1); }

/* Fly intro (chat.js, [data-intro=fly]): words are their own boxes so they
   can travel, and the text box lets them in from outside. Pieces drop in from
   above rather than rise, and everything moves a little slower. */
.composer .fw { display: inline-block; will-change: transform, opacity, filter; }
[data-intro='fly'] .composer .text { overflow: visible; }
.live body[data-intro='fly'] [data-s], .live body[data-intro='fly'] [data-step], .live body[data-intro='fly'] [data-r] { transition-duration: 0.7s; }
.live body[data-intro='fly'] [data-hide] { transform: translateY(-28px); }
