/* PRO: the Lite / Pro switch, the Workshop (model lab, step log, budgets) and the PRO page.
   Same palette as LITE, set tighter and stricter: hairlines, tables, numbers lined up. */

/* ---------- the two modes ---------- */
body:not([data-mode="pro"]) .pro-only { display: none !important; }
body[data-mode="pro"] .lite-only { display: none !important; }

.mode-pick { padding: 3px; gap: 2px; border-radius: 11px; }
.mode-pick button { padding: .32rem .85rem; font-size: .9rem; font-weight: 800; letter-spacing: .01em; border-radius: 8px; }
.mode-pick button[data-set-mode="pro"].on { background: var(--accent-fill); color: var(--accent-ink); }
.nav-mode { margin-left: .5rem; align-self: center; }
body:not(.mobile-app) .rail-mode { display: flex; margin: 0 .1rem .55rem; }
body:not(.mobile-app) .rail-mode button { flex: 1; }
body:not(.mobile-app).rail-folded .rail-mode { flex-direction: column; margin: 0 0 .5rem; }
body:not(.mobile-app).rail-folded .rail-mode button { padding: .3rem 0; font-size: .7rem; }
body.mobile-app .rail-mode { display: flex; width: 100%; margin: .2rem 0 .6rem; }
body.mobile-app .rail-mode button { flex: 1; padding: .5rem; }

/* ---------- the Workshop ---------- */
.pane[data-pane="workshop"] { overflow-y: auto; }
.workshop-body { max-width: 118rem; }
.ws-select { width: auto; min-width: 10rem; padding: .5rem .7rem; font-size: .95rem; }

/* the lab's form */
.lab-form { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .8rem; }
.lab-row { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; }
.lab-row > .field-label { min-width: 4.5rem; }
.lab-models { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.lab-chip { display: inline-flex; align-items: center; gap: .45rem; padding: .35rem .4rem .35rem .65rem; border: 1px solid var(--line); background: var(--bg); border-radius: 11px; animation: s-pop .3s cubic-bezier(.3, 1.5, .5, 1) both; }
.lab-chip .ai-ico { width: 1.15rem; height: 1.15rem; }
.lab-chip b { font-size: .95rem; }
.lab-chip-x { border: 0; background: none; color: var(--soft); width: 1.6rem; height: 1.6rem; border-radius: 7px; display: grid; place-items: center; }
.lab-chip-x:hover:not(:disabled) { background: var(--panel-2); color: var(--text); }
.lab-chip-x:disabled { opacity: .3; cursor: default; }
.lab-chip-x .i { width: .9rem; height: .9rem; }
.lab-add-wrap { position: relative; }
.lab-add { display: inline-flex; align-items: center; gap: .35rem; border: 1px dashed var(--soft); background: none; color: var(--text); border-radius: 11px; padding: .42rem .75rem; font-weight: 700; font-size: .92rem; }
.lab-add:hover:not(:disabled) { border-style: solid; border-color: var(--accent); }
.lab-add .i { width: .95rem; height: .95rem; }
.lab-pop { position: absolute; top: calc(100% + .35rem); left: 0; z-index: 30; width: min(26rem, 80vw); max-height: 22rem; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: .35rem; animation: popin .18s ease both; }
.lab-opt { display: grid; grid-template-columns: 1.4rem 1fr auto; align-items: center; gap: .65rem; width: 100%; border: 0; background: none; border-radius: 10px; padding: .5rem .6rem; text-align: left; }
.lab-opt:hover { background: var(--panel-2); }
.lab-opt .ai-ico { width: 1.3rem; height: 1.3rem; }
.lab-opt span { display: flex; flex-direction: column; line-height: 1.25; }
.lab-opt small { color: var(--soft); }
.lab-opt em { font-style: normal; font-size: .85rem; color: var(--soft); white-space: nowrap; }
.lab-input { min-height: 6.5rem; resize: vertical; font-size: 1.05rem; line-height: 1.5; }
.lab-system { resize: vertical; }
.lab-sys { display: flex; flex-direction: column; gap: .35rem; }
.lab-row-tools { justify-content: space-between; }
.lab-row-tools .link-btn { display: inline-flex; align-items: center; gap: .35rem; font-weight: 700; }
.lab-row-tools .link-btn .i { width: 1rem; height: 1rem; }
.lab-row-run { justify-content: space-between; border-top: 1px solid var(--line); padding-top: .8rem; }
.lab-opts { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.lab-length button { padding: .35rem .8rem; font-size: .9rem; }
.lab-go { display: flex; align-items: center; gap: .9rem; margin-left: auto; }
.lab-quote { color: var(--soft); font-weight: 600; font-size: .92rem; text-align: right; }
.lab-run { display: inline-flex; align-items: center; gap: .45rem; padding: .7rem 1.3rem; }
.lab-run .i { width: 1.05rem; height: 1.05rem; }

/* results */
.lab-summary { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.3rem; margin: 1.1rem 0 .2rem; padding: .7rem 1rem; border-radius: 14px; background: var(--panel-2); font-weight: 700; animation: s-rise .35s ease both; }
.lab-summary > span { display: inline-flex; align-items: center; gap: .4rem; }
.lab-summary .i { width: 1rem; height: 1rem; color: var(--accent-text); }
.lab-summary .lab-hint { color: var(--soft); font-weight: 600; margin-left: auto; }
.lab-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); gap: .8rem; margin-top: 1rem; }
.lab-col { --texu-fill: var(--panel); display: flex; flex-direction: column; min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; animation: s-deal .45s cubic-bezier(.2, .8, .3, 1) both; transition: border-color .25s ease, box-shadow .25s ease; }
.lab-col.run { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.lab-col.win { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); }
.lab-col.bad { border-color: color-mix(in srgb, var(--minus) 45%, var(--line)); }
.lab-col-head { display: flex; align-items: center; gap: .6rem; padding: .8rem 1rem .6rem; }
.lab-col-head .ai-ico { width: 1.5rem; height: 1.5rem; flex: none; }
.lab-col-head > div { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.lab-col-head small { color: var(--soft); font-size: .82rem; }
.lab-badges { margin-left: auto; display: flex; gap: .3rem; flex-wrap: wrap; justify-content: flex-end; }
.lab-badge { font-size: .74rem; font-weight: 800; padding: .15rem .5rem; border-radius: 7px; white-space: nowrap; animation: s-pop .35s cubic-bezier(.3, 1.5, .5, 1) both; }
.lab-badge.b-fast { background: color-mix(in srgb, var(--tool-chat) 16%, transparent); color: color-mix(in srgb, var(--tool-chat) 72%, var(--text)); }
.lab-badge.b-cheap { background: color-mix(in srgb, var(--plus) 16%, transparent); color: color-mix(in srgb, var(--plus) 80%, var(--text)); }
.lab-badge.b-first { background: color-mix(in srgb, var(--tool-speech) 18%, transparent); color: color-mix(in srgb, var(--tool-speech) 80%, var(--text)); }
.lab-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lab-stat { display: flex; flex-direction: column; gap: .05rem; padding: .45rem .7rem; min-width: 0; background: var(--panel); }
.lab-stat .i { display: none; }
.lab-stat b { font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lab-price b, .pd-price b { white-space: normal; overflow: visible; line-height: 1.2; }
.lab-price b small.usd { display: block; font-size: .72rem; }
.lab-stat small { color: var(--soft); font-size: .74rem; font-weight: 700; }
.lab-answer { flex: 1; padding: .9rem 1rem; max-height: 34rem; overflow: auto; font-size: .97rem; }
.lab-answer > :last-child { margin-bottom: 0; }
.lab-error { color: var(--minus); font-weight: 700; margin: 0; }
.lab-wait { display: inline-flex; gap: .3rem; padding: .3rem 0; }
.lab-wait i { width: .45rem; height: .45rem; border-radius: 50%; background: var(--soft); animation: pulse 1s ease-in-out infinite; }
.lab-wait i:nth-child(2) { animation-delay: .15s; }
.lab-wait i:nth-child(3) { animation-delay: .3s; }
.lab-col-foot { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; padding: .6rem .8rem; border-top: 1px solid var(--line); }
.lab-col-foot:empty { display: none; }
.lab-col-foot .act { margin-left: auto; }
.lab-empty { grid-column: 1 / -1; display: flex; align-items: center; gap: 1.4rem; padding: 1.4rem 1.6rem; border: 1px dashed var(--line); border-radius: 18px; }
.lab-empty b { font-size: 1.1rem; }
.lab-empty p { margin: .2rem 0 0; color: var(--soft); max-width: 46rem; }
.texu-lab-texu { width: 5.5rem; flex: none; }

/* past comparisons */
.lab-runs { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--panel); }
.lab-run-row { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) auto 9rem; align-items: center; gap: 1rem; padding: .6rem 1rem; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; animation: s-rise .3s ease both; }
.lab-run-row:first-child { border-top: 0; }
.lab-run-row:hover, .lab-run-row.on { background: var(--panel-2); }
.lab-run-row time { color: var(--soft); font-size: .88rem; white-space: nowrap; }
.lab-run-q { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.lab-run-models { display: flex; gap: .25rem; }
.lab-run-m { width: 1.7rem; height: 1.7rem; border-radius: 8px; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--line); }
.lab-run-m.win { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.lab-run-m .ai-ico { width: 1rem; height: 1rem; }
.lab-run-m i { font-style: normal; font-weight: 800; font-size: .8rem; }
.lab-run-row > b { text-align: right; font-size: .9rem; white-space: nowrap; }

/* the step log */
.ws-filters { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 1rem; }
.ws-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 16px; background: var(--panel); overflow: hidden; }
.ws-kpi { display: flex; flex-direction: column; padding: .85rem 1.1rem; gap: .1rem; min-width: 0; animation: s-rise .35s ease both; }
.ws-kpi + .ws-kpi { border-left: 1px solid var(--line); }
.ws-kpi small { color: var(--soft); font-weight: 700; font-size: .82rem; }
.ws-kpi b { font-size: 1.35rem; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws-kpi span { color: var(--soft); font-size: .82rem; }
.ws-top { margin-top: .4rem; }
.ws-top-row { display: grid; grid-template-columns: 1.3rem minmax(8rem, 13rem) minmax(0, 1fr) auto 5.5rem; align-items: center; gap: .7rem; padding: .3rem 0; }
.ws-top-row .ai-ico { width: 1.2rem; height: 1.2rem; }
.ws-top-row span { font-weight: 700; }
.ws-top-row small { color: var(--soft); text-align: right; }
.ws-bar { display: block; height: .55rem; border-radius: 6px; background: var(--panel-2); position: relative; overflow: hidden; }
.ws-bar::after { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--w, 0); background: var(--accent); border-radius: 6px; animation: ws-grow .7s cubic-bezier(.2, .8, .3, 1) both; }
@keyframes ws-grow { from { width: 0; } }
.ws-table-wrap { overflow-x: auto; margin-top: 1rem; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.ws-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.ws-table th { text-align: left; font-size: .78rem; font-weight: 800; color: var(--soft); text-transform: none; padding: .65rem .9rem; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--panel-2); }
.ws-table td { padding: .55rem .9rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.ws-table tbody tr:last-child td { border-bottom: 0; }
.ws-table tbody tr { animation: s-fade .3s ease both; }
.ws-table tbody tr:hover { background: color-mix(in srgb, var(--panel-2) 60%, transparent); }
.ws-table tr.bad td { color: var(--soft); }
.ws-table .num { text-align: right; white-space: nowrap; }
.ws-when { white-space: nowrap; color: var(--soft); }
.ws-model { display: flex; align-items: center; gap: .5rem; min-width: 11rem; }
.ws-model > span > small { margin-left: 0; }
.ws-model .ai-ico { width: 1.15rem; height: 1.15rem; flex: none; }
.ws-model > span { display: flex; flex-direction: column; line-height: 1.25; }
.ws-model small { color: var(--soft); font-size: .8rem; margin-left: .2rem; }
.ws-price { font-weight: 700; }
.ws-src { display: inline-block; font-size: .78rem; font-weight: 800; padding: .12rem .5rem; border-radius: 7px; background: var(--panel-2); color: var(--soft); white-space: nowrap; }
.ws-src.s-chat { color: color-mix(in srgb, var(--tool-chat) 72%, var(--text)); background: color-mix(in srgb, var(--tool-chat) 12%, transparent); }
.ws-src.s-lab { color: var(--accent-text); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.ws-src.s-build, .ws-src.s-agent { color: color-mix(in srgb, var(--tool-music) 55%, var(--text)); background: color-mix(in srgb, var(--tool-music) 14%, transparent); }
.ws-src.s-image { color: color-mix(in srgb, var(--tool-image) 65%, var(--text)); background: color-mix(in srgb, var(--tool-image) 12%, transparent); }
.ws-src.s-video { color: color-mix(in srgb, var(--tool-video) 65%, var(--text)); background: color-mix(in srgb, var(--tool-video) 12%, transparent); }
.ws-src.s-speech, .ws-src.s-music { color: color-mix(in srgb, var(--tool-speech) 55%, var(--text)); background: color-mix(in srgb, var(--tool-speech) 14%, transparent); }
.ws-status { font-size: .8rem; font-weight: 700; color: var(--plus); white-space: nowrap; }
.ws-status.st-failed { color: var(--minus); }
.ws-status.st-stopped { color: var(--soft); }
.ws-more { margin: 1rem auto 0; display: block; }

/* budgets */
.ws-budgets { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 24rem), 1fr)); gap: .8rem; }
.ws-budget { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .75rem; animation: s-deal .4s cubic-bezier(.2, .8, .3, 1) both; }
.ws-budget-top { display: flex; flex-direction: column; gap: .35rem; }
.ws-budget-top > div { display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.ws-budget-top b { font-size: 1.1rem; }
.ws-budget-top small { color: var(--soft); }
.ws-budget-num { font-weight: 800; font-size: 1.15rem; }
.ws-meter { height: .6rem; border-radius: 7px; background: var(--panel-2); overflow: hidden; }
.ws-meter i { display: block; height: 100%; width: var(--w, 0); background: var(--plus); border-radius: 7px; animation: ws-grow .8s cubic-bezier(.2, .8, .3, 1) both; }
.ws-meter.warn i { background: var(--tool-speech); }
.ws-meter.full i { background: var(--minus); }
.ws-budget-form { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.ws-usd-wrap { position: relative; display: inline-flex; align-items: center; }
.ws-usd-wrap i { position: absolute; left: .75rem; font-style: normal; font-weight: 800; color: var(--soft); pointer-events: none; }
.ws-usd { width: 10rem; padding-left: 1.6rem; }
.ws-note { display: flex; align-items: center; gap: .5rem; color: var(--soft); margin: .9rem 0 0; font-weight: 600; }
.ws-note .i { width: 1rem; height: 1rem; flex: none; }
.ws-sublead { margin: -.4rem 0 .9rem; max-width: 52rem; }
.ws-newp { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-top: .9rem; padding: .8rem; border: 1px dashed var(--line); border-radius: 16px; }
.ws-newp > .inp:first-child { flex: 1; min-width: 12rem; width: auto; }

/* bots in Telegram */
.bot-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 24rem), 1fr)); gap: .8rem; margin-top: .4rem; }
.bot-card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .75rem; animation: s-deal .4s cubic-bezier(.2, .8, .3, 1) both; }
.bot-card.st-off { opacity: .75; }
.bot-card.st-error { border-color: color-mix(in srgb, var(--minus) 45%, var(--line)); }
.bot-top { display: flex; align-items: center; gap: .7rem; }
.bot-ava { width: 2.6rem; height: 2.6rem; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, #2aabee 18%, transparent); color: #1f8fcf; flex: none; }
.bot-ava .i { width: 1.25rem; height: 1.25rem; }
.bot-id { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.bot-id b { font-size: 1.08rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bot-id a { color: var(--soft); font-weight: 600; text-decoration: none; }
.bot-id a:hover { color: var(--accent-text); }
.bot-state { margin-left: auto; font-size: .78rem; font-weight: 800; padding: .2rem .6rem; border-radius: 8px; white-space: nowrap; }
.bot-state.s-on { background: color-mix(in srgb, var(--plus) 15%, transparent); color: color-mix(in srgb, var(--plus) 80%, var(--text)); }
.bot-state.s-off { background: var(--panel-2); color: var(--soft); }
.bot-state.s-error { background: color-mix(in srgb, var(--minus) 14%, transparent); color: color-mix(in srgb, var(--minus) 80%, var(--text)); white-space: normal; text-align: right; }
.bot-agent { display: flex; align-items: center; gap: .45rem; color: var(--soft); font-weight: 600; }
.bot-agent .i { width: 1rem; height: 1rem; flex: none; }
.bot-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.bot-stats span { display: flex; flex-direction: column; padding: .5rem .7rem; background: var(--bg); min-width: 0; }
.bot-stats b { font-size: 1.02rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bot-stats small { color: var(--soft); font-size: .76rem; font-weight: 700; }
.bot-empty ol, .bot-how { margin: .6rem 0 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .3rem; color: var(--soft); }
.bot-how a { color: var(--accent-text); font-weight: 700; }
.bot-new { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: 1.1rem; margin-bottom: 1rem; animation: s-rise .35s ease both; }
.bot-new > h3 { margin: 0; }
.bot-step { display: flex; gap: .9rem; align-items: flex-start; }
.bot-step > div { display: flex; flex-direction: column; gap: .55rem; flex: 1; min-width: 0; max-width: 46rem; }
.bot-step h3 { margin: .2rem 0 0; font-size: 1.12rem; }
.bot-step .how-n { flex: none; }
.bot-step .link-btn { align-self: flex-start; }
.bot-token { font-family: inherit; letter-spacing: .01em; }
.bot-go { padding-left: 3.2rem; }
.bot-chats { display: flex; flex-direction: column; gap: .4rem; }
.bot-chat-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: .8rem; padding: .6rem .7rem; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); text-align: left; }
.bot-chat-row:hover:not(:disabled) { border-color: var(--text); }
.bot-chat-who { display: flex; flex-direction: column; min-width: 0; }
.bot-chat-who b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bot-chat-who small, .bot-chat-n { color: var(--soft); font-size: .82rem; }
.bot-talk { display: flex; flex-direction: column; gap: .55rem; margin-top: .7rem; }
.bot-msg { max-width: 92%; padding: .55rem .75rem; border-radius: 14px; background: var(--panel-2); }
.bot-msg.user { align-self: flex-end; background: color-mix(in srgb, var(--accent) 14%, var(--panel)); }
.bot-msg small { display: block; color: var(--soft); font-weight: 700; font-size: .76rem; margin-bottom: .15rem; }
.bot-msg p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 700px) { .bot-go { padding-left: 0; } .bot-step { flex-direction: column; } }

/* batch runs */
.batch-new .bot-step > div { max-width: 60rem; }
.batch-paste { font-size: .9rem; resize: vertical; min-height: 7rem; }
.batch-template { resize: vertical; }
.batch-cols .idea-chip { font-weight: 700; padding: .35rem .65rem; }
.batch-preview { display: flex; flex-direction: column; gap: .5rem; }
.batch-preview .ws-table-wrap { margin-top: 0; max-height: 14rem; overflow: auto; }
.batch-count { display: flex; align-items: center; gap: .45rem; font-weight: 700; }
.batch-count .i { width: 1rem; height: 1rem; color: var(--accent-text); }
.batch-mini td, .batch-mini th { padding: .4rem .65rem; font-size: .85rem; }
.batch-mini tbody tr, .batch-table tbody tr { animation: none; }
.batch-target { max-width: 30rem; }
.batch-go { border-top: 1px solid var(--line); padding-top: .9rem; }
.batch-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--panel); }
.batch-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(8rem, 1fr) auto 8rem; align-items: center; gap: 1rem; padding: .75rem 1rem; border: 0; border-top: 1px solid var(--line); background: none; text-align: left; animation: s-rise .3s ease both; }
.batch-row:first-child { border-top: 0; }
.batch-row:hover { background: var(--panel-2); }
.batch-row-name { display: flex; flex-direction: column; min-width: 0; }
.batch-row-name b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.batch-row-name small, .batch-row-prog small { color: var(--soft); font-size: .8rem; }
.batch-row-prog { display: flex; flex-direction: column; gap: .25rem; }
.batch-row-price { text-align: right; white-space: nowrap; }
.batch-state { font-size: .78rem; font-weight: 800; padding: .18rem .55rem; border-radius: 8px; background: var(--panel-2); color: var(--soft); white-space: nowrap; }
.batch-state.s-running { background: color-mix(in srgb, var(--tool-chat) 14%, transparent); color: color-mix(in srgb, var(--tool-chat) 72%, var(--text)); }
.batch-state.s-done { background: color-mix(in srgb, var(--plus) 15%, transparent); color: color-mix(in srgb, var(--plus) 80%, var(--text)); }
.batch-state.s-paused { background: color-mix(in srgb, var(--tool-speech) 16%, transparent); color: color-mix(in srgb, var(--tool-speech) 55%, var(--text)); white-space: normal; }
.batch-bar.s-running i { background: var(--tool-chat); }
.batch-bar.s-paused i, .batch-bar.s-stopped i { background: var(--tool-speech); }
.batch-back { margin-bottom: .6rem; font-weight: 700; }
.batch-job { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: .9rem 1rem; display: flex; flex-direction: column; gap: .6rem; }
.batch-job-top { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.batch-job-top .batch-row-price { margin-left: auto; }
.batch-tpl { display: flex; gap: .5rem; margin: 0; color: var(--soft); }
.batch-tpl .i { width: 1rem; height: 1rem; flex: none; margin-top: .2rem; }
.batch-tpl span { white-space: pre-wrap; overflow-wrap: anywhere; }
.batch-in { max-width: 16rem; font-weight: 600; }
.batch-out { min-width: 18rem; }
.batch-answer { max-height: 7.5rem; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9rem; }
@media (max-width: 700px) {
  .batch-row { grid-template-columns: minmax(0, 1fr) auto; }
  .batch-row-prog, .batch-row .batch-state { display: none; }
}

/* the team */
.team-pick { margin-bottom: 1rem; }
.team-new { gap: .9rem; }
.team-empty { display: flex; gap: 1.3rem; align-items: center; }
.team-empty b { font-size: 1.1rem; }
.team-empty p { margin: .25rem 0 0; color: var(--soft); max-width: 46rem; }
.team-points { margin-top: .7rem; }
.team-create-row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.team-create-row > .inp:first-child { flex: 1; min-width: 14rem; width: auto; }
.team-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); gap: .8rem; }
.team-big { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.01em; }
.team-mine { margin: 0; font-weight: 700; }
.team-pay { align-self: flex-start; }
.team-pay button { padding: .45rem 1.2rem; }
.team-invite { margin-top: .9rem; padding: .9rem 1rem; border: 1px dashed var(--line); border-radius: 16px; display: flex; flex-direction: column; gap: .5rem; }
.team-invite > div:first-child { display: flex; flex-direction: column; }
.team-invite small { color: var(--soft); }
.team-link { font-size: .9rem; }
.team-who { display: flex; align-items: center; gap: .55rem; }
.team-who .me-ava { width: 1.8rem; height: 1.8rem; font-size: .85rem; flex: none; }
.team-who small { color: var(--soft); }
.team-lim-form { display: flex; gap: .4rem; align-items: center; }
.team-lim { width: 8rem; padding-top: .4rem; padding-bottom: .4rem; }
.team-danger { margin-top: 1.4rem; }
.wallet-team { font-size: .78rem; font-weight: 700; color: var(--accent-text); text-align: right; margin-top: .1rem; }
@media (max-width: 700px) {
  .team-empty { flex-direction: column; align-items: flex-start; }
  .team-table th:nth-child(2), .team-table td:nth-child(2) { display: none; }
}

/* the business page: create a team, or write to us */
.team-ctas { display: flex; gap: .6rem; flex-wrap: wrap; }
.team .team-ctas .btn.ghost { background: transparent; color: var(--bg); border: 1px solid color-mix(in srgb, var(--bg) 45%, transparent); }

/* design pass after the review of 2026-10-31 */
.workshop-body { padding-bottom: 5rem; }
.lab-bar { display: flex; align-items: center; gap: .8rem; padding: .7rem .9rem; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; animation: s-rise .3s ease both; }
.lab-bar-models { display: flex; gap: .25rem; flex: none; }
.lab-bar-models .ai-ico { width: 1.3rem; height: 1.3rem; }
.lab-bar-q { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 700; }
.lab-answer { max-height: max(18rem, calc(100vh - 24rem)); }
.lab-badge.b-win { background: var(--accent-fill); color: var(--accent-ink); }
.lab-col-foot .btn.small.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.lab-empty .btn { margin-top: .8rem; }
.usd-hint { color: var(--soft); font-weight: 700; font-size: .82rem; min-height: 1em; }
.usd-hint:empty { display: none; }
.ws-meter { position: relative; }
.ws-meter i { min-width: 4px; }
.ws-meter-pct { position: absolute; right: 0; top: -1.25rem; font-size: .72rem; font-weight: 800; color: var(--soft); }
.ws-budget .ws-meter { margin-top: .9rem; }
.ws-budgets { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.ws-safety p { display: flex; align-items: center; gap: .4rem; }
.ws-safety p .i { width: .95rem; height: .95rem; flex: none; }
.bot-checks { list-style: none; padding: 0; margin: .7rem 0 0; display: flex; flex-direction: column; gap: .35rem; }
.bot-checks li { display: flex; align-items: center; gap: .5rem; color: var(--soft); font-weight: 600; }
.bot-checks li .i { width: 1rem; height: 1rem; flex: none; }
.bot-checks li.done { color: var(--text); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--plus) 60%, transparent); }
.bot-checks li.done .i { color: var(--plus); }
.batch-new { display: grid; grid-template-columns: minmax(0, 1fr) 21rem; gap: 1.1rem 1.6rem; align-items: start; }
.batch-new > .bot-step { grid-column: 1; }
.batch-side { grid-column: 2; grid-row: 1 / span 3; position: sticky; top: 1rem; display: flex; flex-direction: column; gap: .7rem; padding: 1rem; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); }
.batch-side-t { font-size: 1.05rem; }
.batch-sum-lines { display: flex; flex-direction: column; gap: .5rem; }
.batch-sum-lines > div { display: flex; flex-direction: column; }
.batch-sum-lines small { color: var(--soft); font-weight: 700; font-size: .78rem; }
.batch-side .lab-quote { text-align: left; }
.batch-side .lab-run { justify-content: center; }
.batch-new .bot-step > div { max-width: none; }
.batch-bar.s-running i { background-image: repeating-linear-gradient(45deg, rgba(255, 255, 255, .28) 0 8px, transparent 8px 16px); background-size: 200% 100%; animation: ws-stripe 1.2s linear infinite; }
@keyframes ws-stripe { to { background-position: -45px 0; } }
@media (max-width: 1100px) {
  .ws-log th:nth-child(2), .ws-log td:nth-child(2), .ws-log th:nth-child(5), .ws-log td:nth-child(5) { display: none; }
  .batch-new { grid-template-columns: 1fr; }
  .batch-side { grid-column: 1; grid-row: auto; position: static; }
}
@media (max-width: 700px) {
  #workshop-nav { flex: none; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; padding-bottom: .2rem; }
  #workshop-nav::-webkit-scrollbar { display: none; }
  #workshop-nav button { flex: none; }
  .bot-step { flex-direction: row; }
  .bot-step > div { min-width: 0; }
  .batch-side { position: sticky; bottom: 0; top: auto; z-index: 5; box-shadow: var(--shadow); flex-direction: row; align-items: center; padding: .55rem .6rem; gap: .6rem; }
  .batch-side .batch-side-t, .batch-side .batch-sum-lines { display: none; }
  .batch-side .lab-quote { flex: 1; font-size: .82rem; }
  .batch-side .lab-run { flex: none; padding: .6rem 1rem; }
  .lab-bar { flex-wrap: wrap; }
  .lab-bar-q { flex-basis: 100%; order: -1; }
}
@media (prefers-reduced-motion: reduce) { .batch-bar.s-running i { animation: none; } }

/* PRO in the chat */
.pro-quick { margin-top: .5rem; }

/* ---------- the PRO page ---------- */
.pro-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(2rem, 4vw, 4.5rem); align-items: center; padding-top: clamp(2.5rem, 6vh, 5rem); }
.pro-kicker { display: inline-flex; align-items: center; gap: .45rem; font-weight: 800; color: var(--accent-text); font-size: 1rem; letter-spacing: .02em; }
.pro-kicker .i { width: 1rem; height: 1rem; }
.pro-hero h1 { font-size: clamp(2.3rem, 3.6vw, 4.2rem); line-height: 1.04; letter-spacing: -0.035em; margin: .9rem 0 1rem; text-wrap: balance; }
.pro-hero .lead { font-size: clamp(1.08rem, 1.15vw, 1.3rem); color: var(--soft); margin: 0 0 1.6rem; max-width: 38rem; }
.pro-ctas { display: flex; gap: .7rem; flex-wrap: wrap; }
.btn.ghost.big { background: transparent; border: 1px solid var(--line); color: var(--text); }
.btn.ghost.big:hover { border-color: var(--text); }
.pro-proof { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem 1.2rem; }
.pro-proof li { display: flex; align-items: center; gap: .5rem; font-weight: 700; animation: s-slide .4s ease both; }
.pro-proof .i { width: 1.05rem; height: 1.05rem; color: var(--plus); flex: none; }

.pro-demo { background: var(--panel); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; animation: s-side .6s cubic-bezier(.2, .8, .3, 1) .15s both; }
.pd-top { display: flex; align-items: center; gap: .6rem; padding: .75rem 1rem; border-bottom: 1px solid var(--line); }
.pd-top small { margin-left: auto; color: var(--soft); font-weight: 700; font-size: .82rem; }
.pd-dot { width: .6rem; height: .6rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 20%, transparent); }
.pro-demo.pd-played .pd-dot { background: var(--plus); box-shadow: 0 0 0 4px color-mix(in srgb, var(--plus) 20%, transparent); }
.pd-prompt { display: flex; align-items: center; gap: .55rem; padding: .75rem 1rem; font-weight: 700; background: var(--panel-2); }
.pd-prompt .i { width: 1rem; height: 1rem; color: var(--accent-text); flex: none; }
.pd-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pd-col { display: flex; flex-direction: column; min-width: 0; border-top: 1px solid var(--line); }
.pd-col + .pd-col { border-left: 1px solid var(--line); }
.pd-head { display: flex; flex-wrap: wrap; align-items: center; align-content: center; gap: .3rem .45rem; padding: .55rem .8rem; min-height: 4.4rem; }
.pd-head .ai-ico { width: 1.2rem; height: 1.2rem; flex: none; }
.pd-head b { font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-badges { margin-left: auto; display: flex; gap: .25rem; }
.pd-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pd-stat { display: flex; flex-direction: column; padding: .35rem .55rem; min-width: 0; background: var(--panel); }
.pd-stat.pd-price { grid-column: 1 / -1; flex-direction: row; align-items: baseline; justify-content: space-between; gap: .5rem; }
.pd-stat b { font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-stat small { font-size: .68rem; color: var(--soft); font-weight: 700; }
.pd-text { margin: 0; padding: .75rem .8rem 1rem; font-size: .9rem; line-height: 1.5; min-height: 10.5rem; color: var(--text); }
.pd-col.pd-live:not(.pd-done) .pd-text::after { content: ''; display: inline-block; width: .45em; height: 1em; background: var(--accent); vertical-align: text-bottom; margin-left: 2px; animation: blink 1s steps(2) infinite; }
.pd-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .65rem 1rem; border-top: 1px solid var(--line); background: var(--panel-2); font-size: .85rem; }
.pd-sum { font-weight: 800; }
.pd-note { color: var(--soft); font-weight: 600; text-align: right; }

.pro-sub { margin: .4rem 0 0; color: var(--soft); max-width: 46rem; font-size: 1.08rem; flex-basis: 100%; }
.pro-cards { display: grid; gap: .9rem; }
.pro-cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pro-cards.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pro-card { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 1.2rem 1.25rem; display: flex; flex-direction: column; gap: .5rem; color: var(--text); text-decoration: none; animation: s-deal .45s cubic-bezier(.2, .8, .3, 1) both; transition: border-color .2s ease, transform .2s ease; }
.pro-card.link:hover { border-color: var(--text); transform: translateY(-2px); }
.pro-card h3 { margin: .2rem 0 0; font-size: 1.2rem; letter-spacing: -0.01em; }
.pro-card p { margin: 0; color: var(--soft); }
.pro-card .more { margin-top: auto; padding-top: .3rem; font-weight: 800; color: var(--accent-text); }
.pro-ico { width: 2.5rem; height: 2.5rem; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 13%, transparent); color: var(--accent-text); }
.pro-ico .i { width: 1.25rem; height: 1.25rem; }
.pro-card.soon { border-style: dashed; }
.soon-tag { position: absolute; top: 1.1rem; right: 1.1rem; font-size: .75rem; font-weight: 800; padding: .15rem .55rem; border-radius: 7px; background: var(--panel-2); color: var(--soft); }
.pm-quote { margin-top: auto; display: flex; flex-direction: column; gap: .55rem; align-items: flex-start; padding: .8rem; border-radius: 14px; background: var(--bg); border: 1px solid var(--line); font-weight: 700; font-size: .92rem; }
.pm-quote .btn { pointer-events: none; }
.pm-log { margin-top: auto; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--bg); }
.pm-row { display: flex; align-items: center; gap: .5rem; padding: .4rem .55rem; font-size: .8rem; animation: s-slide .35s ease both; }
.pm-row .pm-model { flex: 1; }
.pm-row + .pm-row { border-top: 1px solid var(--line); }
.pm-model { display: flex; align-items: center; gap: .35rem; min-width: 0; font-weight: 700; }
.pm-model span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-model .ai-ico { width: .95rem; height: .95rem; flex: none; }
.pm-num { white-space: nowrap; color: var(--soft); }
b.pm-num { color: var(--text); }
.pm-row .ws-src { font-size: .7rem; padding: .08rem .4rem; }
.pm-budget { display: flex; flex-direction: column; gap: .35rem; margin-top: auto; }
.pm-budget + .pm-budget { margin-top: .6rem; }
.pm-budget > div:first-child { display: flex; justify-content: space-between; font-weight: 700; font-size: .9rem; }
.pro-steps { list-style: none; padding: 0; margin: 0 0 1.6rem; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .9rem; }
.pro-steps li { display: flex; gap: .9rem; align-items: flex-start; background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 1.2rem; animation: s-deal .45s ease both; }
.pro-steps h3 { margin: .15rem 0 .3rem; font-size: 1.15rem; }
.pro-steps p { margin: 0; color: var(--soft); }
.pro-steps .how-n { flex: none; }
.pro-table td, .pro-table th { padding: .6rem 1rem; }
.pro-fine { margin-top: .8rem; max-width: 60rem; }
.pro-fine a { color: var(--accent-text); font-weight: 700; }
.pro-final { text-align: center; }

/* PRO's header has more links: below 1440 px the theme switch waits in the menu, below 1280 px the prices link too. */
@media (min-width: 1101px) and (max-width: 1440px) {
  body[data-mode="pro"] .nav-end .theme-pick { display: none; }
}
@media (min-width: 1101px) and (max-width: 1300px) {
  body[data-mode="pro"] .nav-links a[href="/pro#prices"] { display: none !important; }
}
@media (max-width: 1500px) {
  .pm-row .ws-src, .pm-row .pm-num:not(b) + .pm-num:not(b) { display: none; }
}
/* The phone menu: the menu button stays in the top row, the switch lines up with the links. */
@media (max-width: 1100px) {
  .nav .menu-btn { grid-row: 1; grid-column: 3; }
  body.menu-open .nav-mode { align-self: flex-start; margin: .5rem 0 .2rem .9rem; }
}
@media (max-width: 1100px) {
  .pro-hero { grid-template-columns: 1fr; }
  .pro-cards.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pro-cards.three, .pro-steps { grid-template-columns: 1fr; }
  .lab-run-row { grid-template-columns: 7rem minmax(0, 1fr) auto; }
  .lab-run-row > b { display: none; }
}
@media (max-width: 700px) {
  .pd-cols { grid-template-columns: 1fr; }
  .pd-col + .pd-col { border-left: 0; }
  .pd-text { min-height: 0; }
  .pro-proof { grid-template-columns: 1fr; }
  .pro-cards.four { grid-template-columns: 1fr; }
  .ws-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ws-kpi:nth-child(3) { border-left: 0; }
  .ws-kpi b { white-space: normal; font-size: 1.2rem; }
  .ws-kpi b small.usd { display: block; font-size: .75rem; }
  .ws-kpi:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .ws-top-row { grid-template-columns: 1.3rem minmax(0, 1fr) auto; }
  .ws-top-row .ws-bar, .ws-top-row small { display: none; }
  .ws-log th:nth-child(2), .ws-log td:nth-child(2), .ws-log th:nth-child(4), .ws-log td:nth-child(4), .ws-log th:nth-child(5), .ws-log td:nth-child(5) { display: none; }
  .ws-log td, .ws-log th { padding: .5rem .55rem; }
  .ws-model { min-width: 0; }
  .lab-go { width: 100%; justify-content: space-between; margin-left: 0; }
  .lab-quote { text-align: left; }
  .lab-run-row { grid-template-columns: minmax(0, 1fr) auto; }
  .lab-run-row time { display: none; }
  .lab-summary .lab-hint { margin-left: 0; }
  .nav-mode { margin: .4rem 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  .lab-col, .lab-chip, .lab-badge, .ws-budget, .pro-card, .pro-steps li, .pm-row, .ws-table tbody tr { animation: none; }
}
