/* Stroka in the browser: make a site by describing it. One file, no frameworks. */
@font-face { font-family: "Golos Text"; src: url("/static/fonts/golos-text.woff") format("woff"); font-weight: 400 900; font-display: swap; }
:root {
  --bg: #1a1a19; --bg-2: #1f1f1e; --raise: #242423; --raise-2: #2c2c2b; --line: #353533; --line-2: #42423f;
  --fg: #ecebe8; --fg-2: #c9c7c2; --muted: #9d9a94; --faint: #6f6c67;
  --accent: #ff5a6e; --accent-2: #ff7a8a; --accent-soft: rgba(255, 90, 110, .12); --ok: #7ccf8b; --bad: #ff6b6b; --warn: #f0c674;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.55 "Golos Text", -apple-system, "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased; overflow: hidden; }
#app { height: 100%; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-2); }
svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.grow { flex: 1; }
.muted { color: var(--muted); }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line-2); background: var(--raise); color: var(--fg);
  padding: 7px 14px; border-radius: 10px; font-weight: 500; transition: background .15s, border-color .15s, transform .1s; white-space: nowrap; }
.btn:hover { background: var(--raise-2); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn.ghost { background: none; border-color: transparent; color: var(--fg-2); }
.btn.ghost:hover { background: var(--raise); color: var(--fg); }
.btn.small { padding: 5px 10px; font-size: .9em; border-radius: 8px; }
.icon-btn { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 9px; border: 0; background: none; color: var(--fg-2); }
.icon-btn:hover { background: var(--raise); color: var(--fg); }
.icon-btn svg { width: 18px; height: 18px; }
.link { background: none; border: 0; padding: 0; color: var(--accent-2); }
.link:hover { text-decoration: underline; }

/* the bar on top */
.top { height: 56px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--line); background: var(--bg); position: relative; z-index: 5; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 17px; letter-spacing: -.01em; color: var(--fg); text-decoration: none; border: 0; background: none; padding: 4px 6px; border-radius: 8px; }
.brand svg { width: 24px; height: 24px; color: var(--accent); stroke-width: 2.6; }
.brand small { font-weight: 500; color: var(--muted); font-size: 13px; margin-left: 2px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; border: 0;
  background: linear-gradient(135deg, var(--accent), #8a6cff); }
.usage-chip { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 7px; }
.usage-chip .bar { width: 56px; height: 4px; border-radius: 4px; background: var(--raise-2); overflow: hidden; }
.usage-chip .bar i { display: block; height: 100%; background: var(--accent); }

/* menus */
.menu { position: fixed; z-index: 50; min-width: 240px; background: var(--raise); border: 1px solid var(--line-2); border-radius: 12px; padding: 6px;
  box-shadow: 0 18px 50px rgba(0,0,0,.45); animation: pop .14s var(--ease); }
.menu .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.menu .who b { display: block; } .menu .who span { font-size: 13px; color: var(--muted); }
.menu button { display: flex; width: 100%; align-items: center; gap: 10px; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; color: var(--fg); }
.menu button:hover { background: var(--raise-2); }
.menu button.danger { color: var(--bad); }
.menu svg { width: 16px; height: 16px; color: var(--muted); }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } }

/* sign in */
.auth { height: 100%; display: grid; place-items: center; padding: 24px; overflow: auto;
  background: radial-gradient(900px 500px at 50% -10%, rgba(255,90,110,.10), transparent 60%), var(--bg); }
.auth-card { width: min(420px, 100%); background: var(--bg-2); border: 1px solid var(--line); border-radius: 20px; padding: 28px; }
.auth-card h1 { font-size: 24px; margin: 14px 0 6px; letter-spacing: -.01em; }
.auth-card p { margin: 0 0 18px; color: var(--muted); }
.tabs { display: flex; gap: 4px; background: var(--raise); padding: 4px; border-radius: 11px; margin-bottom: 16px; }
.tabs button { flex: 1; border: 0; background: none; padding: 7px; border-radius: 8px; color: var(--muted); font-weight: 500; }
.tabs button[aria-selected="true"] { background: var(--raise-2); color: var(--fg); }
.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 13px; color: var(--fg-2); }
.input, .field input { width: 100%; background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; outline: none; transition: border-color .15s; }
.input:focus, .field input:focus { border-color: var(--accent); }
.consent { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; color: var(--fg-2); margin: 4px 0 14px; }
.consent input { accent-color: var(--accent); margin-top: 3px; }
.err { color: var(--bad); font-size: 13.5px; min-height: 1.2em; margin-top: 10px; }
.auth-card .btn.primary { width: 100%; justify-content: center; padding: 11px; }

/* home: what shall we make */
.home { height: calc(100% - 56px); overflow-y: auto; }
.hero { max-width: 760px; margin: 0 auto; padding: 64px 24px 32px; text-align: center; }
.hero h1 { font-size: clamp(30px, 5vw, 46px); line-height: 1.1; letter-spacing: -.02em; margin: 0 0 12px; }
.hero p { color: var(--muted); font-size: 17px; margin: 0 0 28px; }
.prompt { text-align: left; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 18px; padding: 14px; transition: border-color .15s, box-shadow .15s; }
.prompt:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.prompt textarea { width: 100%; min-height: 84px; max-height: 260px; resize: none; background: none; border: 0; outline: none; font-size: 16px; line-height: 1.5; }
.prompt .row { display: flex; align-items: center; gap: 8px; }
.prompt .hint { font-size: 12.5px; color: var(--faint); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 16px; }
.chip { border: 1px solid var(--line-2); background: none; color: var(--fg-2); padding: 6px 12px; border-radius: 999px; font-size: 13.5px; transition: border-color .15s, color .15s, background .15s; }
.chip:hover { border-color: var(--accent); color: var(--fg); background: var(--accent-soft); }
.projects { max-width: 1100px; margin: 0 auto; padding: 8px 24px 64px; }
.projects h2 { font-size: 18px; margin: 24px 0 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.card { position: relative; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); overflow: hidden; text-align: left; padding: 0; transition: border-color .15s, transform .15s; color: var(--fg); }
.card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.card .thumb { height: 132px; background: #fff; overflow: hidden; position: relative; border-bottom: 1px solid var(--line); }
.card .thumb iframe { width: 1280px; height: 800px; border: 0; transform: scale(.2); transform-origin: 0 0; pointer-events: none; }
.card .thumb.empty { display: grid; place-items: center; background: var(--raise); color: var(--faint); font-size: 13px; }
.card .meta { padding: 10px 12px 12px; }
.card .meta b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .meta > span { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.badge { white-space: nowrap; }
.badge svg { width: 12px; height: 12px; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: rgba(124,207,139,.12); color: var(--ok); }
.empty-note { color: var(--muted); padding: 18px 0; }

/* a project: the chat and the site */
.studio { height: calc(100% - 56px); display: grid; grid-template-columns: minmax(340px, 420px) 1fr; }
.title-edit { min-width: 0; max-width: 340px; background: none; border: 1px solid transparent; border-radius: 8px; padding: 5px 8px; font-weight: 600; outline: none; text-overflow: ellipsis; }
.title-edit:hover { border-color: var(--line); }
.title-edit:focus { border-color: var(--accent); background: var(--bg-2); }
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--raise); border-radius: 10px; }
.seg button { border: 0; background: none; color: var(--muted); padding: 5px 10px; border-radius: 7px; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.seg button[aria-pressed="true"] { background: var(--raise-2); color: var(--fg); }
.seg svg { width: 15px; height: 15px; }

.chat { display: grid; grid-template-rows: minmax(0, 1fr) auto; border-right: 1px solid var(--line); min-width: 0; background: var(--bg); }
.log { overflow-y: auto; padding: 18px 16px 8px; display: flex; flex-direction: column; gap: 14px; }
.msg-user { align-self: flex-end; max-width: 88%; background: var(--raise-2); padding: 9px 13px; border-radius: 14px 14px 4px 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.turn { display: grid; gap: 8px; min-width: 0; }
.work { display: grid; gap: 4px; }
.work-head { justify-self: start; display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; color: var(--muted); padding: 4px 10px 4px 6px; border-radius: 999px; font-size: 13.5px; }
.work-head:hover { background: var(--raise); color: var(--fg); }
.work-head .chev { width: 13px; height: 13px; transition: transform .2s; }
.work.open .work-head .chev { transform: rotate(180deg); }
.work.live .work-head .label { background: linear-gradient(90deg, var(--muted) 0%, var(--muted) 35%, var(--fg) 50%, var(--muted) 65%, var(--muted) 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 2s linear infinite; }
@keyframes shine { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.wave { width: 18px; height: 18px; color: var(--accent); stroke-width: 2.4; }
.work.live .wave path { stroke-dasharray: 40; animation: draw 1.4s ease-in-out infinite; }
@keyframes draw { 0% { stroke-dashoffset: 40; } 60%, 100% { stroke-dashoffset: 0; } }
.peek { font-size: 12.5px; color: var(--faint); padding-left: 34px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.steps { display: grid; gap: 4px; margin-left: 13px; padding-left: 12px; border-left: 2px solid rgba(255,90,110,.25); }
.step { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding: 5px 10px; border-radius: 8px; background: var(--bg-2); min-width: 0; animation: fade .3s ease-out; }
.step svg { width: 15px; height: 15px; flex: none; }
.step .what { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step.running .what { color: var(--fg-2); }
.step.running svg { color: var(--accent); animation: pulse 1.1s ease-in-out infinite; }
.step.error { color: var(--bad); }
.step.warn { color: var(--warn); }
.step .delta { font-family: var(--mono); font-size: 11.5px; }
.step .add { color: var(--ok); } .step .del { color: var(--bad); }
.step-note { font-size: 13px; color: var(--muted); padding: 2px 4px; }
.step-note p { margin: 0; }
.work:not(.open) .old, .work:not(.open) .step-note, .work:not(.open) .think { display: none; }
.think { font-size: 12.5px; color: var(--faint); font-style: italic; padding: 2px 4px; white-space: pre-wrap; max-height: 160px; overflow: auto; }
.more { justify-self: start; border: 0; background: none; color: var(--faint); font-size: 12.5px; padding: 0 4px 0 36px; }
.more:hover { color: var(--fg); }
@keyframes pulse { 50% { opacity: .45; } }
@keyframes fade { from { opacity: 0; } }
.answer { min-width: 0; overflow-wrap: anywhere; }
.answer > :first-child { margin-top: 0; } .answer > :last-child { margin-bottom: 0; }
.answer p, .answer ul, .answer ol { margin: 0 0 10px; }
.answer ul, .answer ol { padding-left: 20px; }
.answer li { margin: 3px 0; }
.answer code { font-family: var(--mono); font-size: .88em; background: var(--raise-2); padding: 1px 5px; border-radius: 5px; }
.answer .code { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin: 8px 0; }
.answer .code-head { display: flex; justify-content: space-between; padding: 5px 10px; font-size: 12px; color: var(--muted); background: var(--raise); }
.answer .code-copy { border: 0; background: none; color: var(--muted); font-size: 12px; }
.answer pre { margin: 0; padding: 10px 12px; overflow-x: auto; font: 12.5px/1.5 var(--mono); }
.answer pre code { background: none; padding: 0; }
.answer .enter { animation: fade .45s ease-out both; }
.answer.typing > :last-child::after { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-left: 5px; vertical-align: middle; animation: pulse 1s infinite; }
.foot { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--faint); }
.checked { display: inline-flex; align-items: center; gap: 5px; color: var(--ok); background: rgba(124,207,139,.1); padding: 1px 8px; border-radius: 999px; }
.checked svg { width: 12px; height: 12px; }
.note { font-size: 13px; color: var(--muted); text-align: center; }
.error-box { color: var(--bad); background: rgba(255,107,107,.08); border: 1px solid rgba(255,107,107,.25); padding: 8px 12px; border-radius: 10px; font-size: 13.5px; }
.status { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px; }

.composer { padding: 10px 14px 14px; }
.box { border: 1px solid var(--line-2); border-radius: 14px; background: var(--bg-2); padding: 10px 10px 8px 12px; transition: border-color .15s, box-shadow .15s; }
.box:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.box textarea { width: 100%; border: 0; background: none; outline: none; resize: none; min-height: 44px; max-height: 220px; line-height: 1.5; }
.box .row { display: flex; align-items: center; gap: 8px; }
.send { width: 34px; height: 34px; border-radius: 10px; border: 0; background: var(--accent); color: #fff; display: grid; place-items: center; }
.send:disabled { background: var(--raise-2); color: var(--faint); cursor: default; }
.send svg { width: 17px; height: 17px; stroke-width: 2.2; }
.send.stop { background: var(--fg); color: var(--bg); }

.stage { display: grid; grid-template-rows: auto minmax(0, 1fr); min-width: 0; background: #121211; }
.browser-bar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--bg); }
.address { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; background: var(--raise); border-radius: 9px; padding: 6px 12px; font-size: 13px; color: var(--muted); }
.address span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.address svg { width: 14px; height: 14px; flex: none; }
.issues { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 3px 9px; border-radius: 999px; border: 0; }
.issues.bad { color: var(--bad); background: rgba(255,107,107,.12); }
.issues.good { color: var(--ok); background: rgba(124,207,139,.1); }
.canvas { position: relative; overflow: auto; display: grid; place-items: stretch; padding: 0; }
.canvas.phone { place-items: start center; padding: 24px; }
.frame { width: 100%; height: 100%; border: 0; background: #fff; display: block; }
.canvas.phone .frame { width: 390px; height: min(844px, calc(100% - 4px)); border-radius: 28px; border: 8px solid #2b2b2a; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.blank { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 24px; background: #121211; }
.blank b { display: block; color: var(--fg-2); font-size: 18px; margin-bottom: 6px; }
.blank .wave { width: 42px; height: 42px; margin-bottom: 12px; }
.check-frame { position: fixed; left: -20000px; top: 0; height: 800px; border: 0; visibility: hidden; }

/* publishing */
.dialog-back { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: grid; place-items: center; z-index: 60; padding: 20px; animation: fade .15s; }
.dialog { width: min(460px, 100%); background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 18px; padding: 22px; animation: pop .18s var(--ease); }
.dialog h2 { margin: 0 0 6px; font-size: 20px; }
.dialog p { color: var(--muted); margin: 0 0 16px; }
.url-row { display: flex; gap: 8px; align-items: center; background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 8px 8px 12px; margin-bottom: 16px; }
.url-row a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg); text-decoration: none; font-family: var(--mono); font-size: 13px; }
.dialog .actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; background: var(--fg); color: var(--bg); padding: 9px 16px;
  border-radius: 10px; font-size: 14px; transition: opacity .2s, transform .2s; z-index: 80; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* phones and narrow windows: chat and site as tabs */
.mobile-tabs { display: none; }
@media (max-width: 820px) {
  .studio { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .mobile-tabs { display: flex; gap: 4px; padding: 6px 10px; border-bottom: 1px solid var(--line); }
  .mobile-tabs button { flex: 1; border: 0; background: none; padding: 7px; border-radius: 8px; color: var(--muted); }
  .mobile-tabs button[aria-pressed="true"] { background: var(--raise); color: var(--fg); }
  .studio[data-tab="chat"] .stage, .studio[data-tab="site"] .chat { display: none; }
  .chat { border-right: 0; }
  .top .seg, .usage-chip, .title-edit { display: none; }
  .hero { padding-top: 36px; }
  .prompt .hint { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* the chat and the site always fit the window: the input never falls off the bottom */
.studio { grid-template-rows: minmax(0, 1fr); }
.chat, .stage { min-height: 0; }
@media (max-width: 820px) { .studio { grid-template-rows: auto minmax(0, 1fr); } }

/* two products, one switch: the editor and the sites */
.products { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--raise); margin-left: 4px; }
.products a { text-decoration: none; color: var(--muted); font-size: 13px; font-weight: 500; padding: 4px 11px; border-radius: 7px; transition: color .15s, background .15s; }
.products a:hover { color: var(--fg); }
.products a[aria-current="page"] { background: var(--raise-2); color: var(--fg); }

/* actions under a question and an answer */
.user-row { align-self: flex-end; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; max-width: 88%; animation: rise .35s var(--ease) both; }
.user-row .msg-user { max-width: 100%; align-self: auto; }
.acts { display: flex; gap: 2px; opacity: 0; transition: opacity .15s; }
.user-row:hover .acts, .user-row:focus-within .acts { opacity: 1; }
.act { width: 28px; height: 28px; display: grid; place-items: center; border: 0; background: none; color: var(--faint); border-radius: 7px; transition: color .15s, background .15s, transform .15s; }
.act:hover { color: var(--fg); background: var(--raise); }
.act:disabled { opacity: .35; cursor: default; }
.act svg { width: 15px; height: 15px; }
.act.on { color: var(--accent); }
.act.done { color: var(--ok); }
.act.pop { animation: pop-up .45s var(--ease); }
@keyframes pop-up { 40% { transform: scale(1.35) rotate(-8deg); } }
.foot { gap: 2px; flex-wrap: wrap; }
.foot > span { margin-left: 6px; }
.reasons { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); animation: rise .25s var(--ease) both; }
.chip.small { padding: 3px 10px; font-size: 12.5px; }
.edit-box { width: min(100%, 520px); align-self: flex-end; display: grid; gap: 8px; background: var(--bg-2); border: 1px solid var(--accent); border-radius: 14px; padding: 10px; animation: fade .2s; }
.edit-box textarea { width: 100%; min-height: 60px; resize: none; background: none; border: 0; outline: none; line-height: 1.5; }
.edit-box .row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.edit-box .hint { font-size: 12px; color: var(--faint); }

/* motion: things arrive softly, nothing jumps */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
.turn { animation: fade .3s ease-out both; }
.work { animation: rise .35s var(--ease) both; }
.hero h1 { animation: rise .6s var(--ease) both; }
.hero > p { animation: rise .6s .08s var(--ease) both; }
.hero .prompt { animation: rise .6s .16s var(--ease) both; }
.hero .chips { animation: rise .6s .24s var(--ease) both; }
.projects { animation: fade .6s .3s ease-out both; }
.card { animation: rise .45s var(--ease) both; }
.auth-card { animation: rise .5s var(--ease) both; }
.hero h1 { background: linear-gradient(100deg, var(--fg) 0%, var(--fg) 40%, var(--accent-2) 50%, var(--fg) 60%, var(--fg) 100%); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: rise .6s var(--ease) both, sheen 6s 1s ease-in-out infinite; }
@keyframes sheen { 0%, 70% { background-position: 100% 0; } 100% { background-position: -50% 0; } }
.send { transition: transform .15s var(--ease), background .15s; }
.send:not(:disabled):active { transform: scale(.88); }
.btn.primary { position: relative; overflow: hidden; }
.btn.primary::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.25) 50%, transparent 70%); transform: translateX(-120%); transition: transform .6s var(--ease); }
.btn.primary:hover::after { transform: translateX(120%); }

/* the site while Stroka works on it */
.stage { position: relative; }
.progress { position: absolute; left: 0; right: 0; top: 52px; height: 2px; overflow: hidden; z-index: 3; opacity: 0; transition: opacity .3s; pointer-events: none; }
.progress::before { content: ''; position: absolute; top: 0; bottom: 0; width: 35%; background: linear-gradient(90deg, transparent, var(--accent), transparent); animation: slide 1.4s ease-in-out infinite; }
@keyframes slide { from { left: -35%; } to { left: 100%; } }
.stage.busy .progress { opacity: 1; }
.busy-pill { position: absolute; z-index: 4; left: 50%; bottom: 22px; transform: translate(-50%, 20px); opacity: 0; display: inline-flex; align-items: center; gap: 8px;
  background: rgba(26,26,25,.92); color: var(--fg-2); border: 1px solid var(--line-2); padding: 7px 14px 7px 10px; border-radius: 999px; font-size: 13px;
  box-shadow: 0 10px 30px rgba(0,0,0,.4); transition: opacity .3s, transform .3s var(--ease); pointer-events: none; backdrop-filter: blur(8px); }
.busy-pill .wave path { stroke-dasharray: 40; animation: draw 1.4s ease-in-out infinite; }
.stage.busy .busy-pill { opacity: 1; transform: translate(-50%, 0); }
.stage.busy .blank:not([hidden]) ~ .busy-pill, .stage.busy:has(.blank:not([hidden])) .busy-pill { opacity: 0; }
.frame { transition: opacity .35s ease-out, filter .35s ease-out; }
.frame.loading { opacity: .35; filter: blur(2px); }
.blank .idle .wave path { stroke-dasharray: 40; animation: draw 2.4s ease-in-out infinite; }
.blank .sketch { display: none; width: min(560px, 80%); gap: 14px; text-align: left; }
.blank.building .idle { display: none; }
.blank.building .sketch { display: grid; }
.sketch i { display: block; border-radius: 10px; background: linear-gradient(90deg, var(--raise) 0%, var(--raise-2) 50%, var(--raise) 100%); background-size: 200% 100%; animation: shimmer 1.6s linear infinite; }
.sk-nav { height: 18px; width: 40%; } .sk-hero { height: 150px; } .sk-line { height: 14px; width: 80%; } .sk-line.short { width: 55%; }
.sk-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; } .sk-cards i { height: 80px; }
.sketch i:nth-child(2) { animation-delay: .1s; } .sketch i:nth-child(3) { animation-delay: .2s; } .sketch i:nth-child(4) { animation-delay: .3s; }
.sketch p { margin: 6px 0 0; text-align: center; color: var(--muted); font-size: 14px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.dialog .url-row { animation: rise .35s var(--ease) both; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.work:not(.open) .steps:not(:has(.step)) { display: none; }

/* ===== the project screen, second pass: calmer, roomier, nothing cut off ===== */
.top { height: 52px; gap: 8px; padding: 0 10px 0 8px; }
.site-ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.site-ico svg { width: 15px; height: 15px; }
.title-edit { font-size: 15px; max-width: 420px; }
.studio { height: calc(100% - 52px); grid-template-columns: var(--chat-w, clamp(340px, 30vw, 440px)) 0 minmax(0, 1fr); }
.chat { background: var(--bg); border-right: 0; position: relative; }
.resizer { position: relative; z-index: 6; width: 0; cursor: col-resize; }
.resizer::before { content: ''; position: absolute; top: 0; bottom: 0; left: -4px; width: 8px; }
.resizer::after { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 1px; background: var(--line); transition: background .15s, width .15s; }
.resizer:hover::after, .resizing .resizer::after { background: var(--accent); width: 2px; left: -1px; }
.resizing, .resizing * { cursor: col-resize !important; user-select: none; }
.resizing iframe { pointer-events: none; }

/* the conversation */
.log { padding: 20px 18px 12px; gap: 18px; font-size: 14.5px; line-height: 1.6; scroll-padding-bottom: 20px; }
.msg-user { background: var(--raise-2); border: 1px solid var(--line-2); padding: 8px 13px; border-radius: 16px 16px 5px 16px; font-size: 14.5px; }
.who { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; color: var(--fg-2); letter-spacing: .01em; }
.who-ico { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(255,90,110,.22), rgba(138,108,255,.18)); color: var(--accent); }
.who-ico svg { width: 14px; height: 14px; stroke-width: 2.6; }
.turn { gap: 10px; }
.answer { color: var(--fg-2); }
.answer strong { color: var(--fg); }
.answer p, .answer ul, .answer ol { margin-bottom: 8px; }
.answer blockquote { margin: 8px 0; padding: 8px 12px; border-left: 2px solid var(--accent); background: var(--bg-2); border-radius: 0 8px 8px 0; color: var(--fg-2); }
.work-head { font-size: 13px; padding: 3px 10px 3px 4px; }
.step { font-size: 12.5px; padding: 4px 9px; }
.foot .act { width: 26px; height: 26px; }

/* the input: a floating card; the chat fades out above it instead of running under it */
.composer { position: relative; padding: 0 14px 14px; display: grid; gap: 8px; }
.composer::before { content: ''; position: absolute; left: 0; right: 0; top: -26px; height: 26px; background: linear-gradient(to bottom, transparent, var(--bg)); pointer-events: none; }
.box { padding: 10px 10px 8px 14px; border-radius: 16px; box-shadow: 0 8px 30px rgba(0,0,0,.25); }
.box textarea { min-height: 24px; font-size: 14.5px; }
.box .row { margin-top: 4px; }
.kbd-hint { font-size: 11.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.send { width: 32px; height: 32px; border-radius: 50%; }
.ideas { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0; mask-image: linear-gradient(to right, #000 85%, transparent); }
.ideas::-webkit-scrollbar { display: none; }
.idea { flex: none; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--fg-2); font-size: 12.5px; padding: 5px 11px; border-radius: 999px; transition: border-color .15s, color .15s, transform .15s; animation: rise .35s var(--ease) both; }
.idea:hover { border-color: var(--accent); color: var(--fg); transform: translateY(-1px); }
.idea:nth-child(2) { animation-delay: .04s; } .idea:nth-child(3) { animation-delay: .08s; } .idea:nth-child(4) { animation-delay: .12s; } .idea:nth-child(5) { animation-delay: .16s; }

/* the site: one bar with the address, the errors and how to show it */
.stage { background: #111110; }
.browser-bar { gap: 6px; padding: 7px 10px; background: var(--bg); }
.address { gap: 8px; padding: 5px 6px 5px 12px; min-height: 32px; }
.address > span { flex: 1; min-width: 0; }
.issues { flex: none; padding: 2px 9px; font-size: 12px; }
.browser-bar .seg { flex: none; }
.browser-bar .seg button { padding: 5px 9px; }
.progress { top: 46px; }
.canvas { background: radial-gradient(1200px 600px at 50% -10%, rgba(255,90,110,.05), transparent 60%), #111110; }
.canvas.phone .frame { border-color: #262625; box-shadow: 0 0 0 1px #3a3a38, 0 30px 80px rgba(0,0,0,.55); }

/* narrower windows: fold labels away before anything is cut off */
@media (max-width: 1280px) { .usage-chip { display: none; } }
@media (max-width: 1100px) {
  .browser-bar .seg button span, .kbd-hint { display: none; }
  .top .btn.primary, .top .btn { padding: 7px 11px; }
}
@media (max-width: 820px) {
  .studio { grid-template-columns: 1fr; }
  .resizer { display: none; }
  .site-ico { display: none; }
  .title-edit { display: block; max-width: 46vw; }
  .top .btn span, .top #pub-label { display: none; }
}

/* the input's tools: model, files, voice, send */
.box .row { gap: 4px; }
.model-pill { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); background: var(--raise); color: var(--fg-2); font-size: 12.5px;
  padding: 4px 8px 4px 7px; border-radius: 999px; max-width: 60%; transition: border-color .15s, color .15s; }
.model-pill:hover { border-color: var(--accent); color: var(--fg); }
.model-pill span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.model-pill .mi { width: 14px; height: 14px; color: var(--accent); flex: none; }
.model-pill .chev { width: 12px; height: 12px; flex: none; opacity: .7; }
.tool-btn { width: 32px; height: 32px; display: grid; place-items: center; border: 0; background: none; color: var(--muted); border-radius: 50%; transition: color .15s, background .15s; }
.tool-btn:hover { color: var(--fg); background: var(--raise); }
.tool-btn:disabled { opacity: .4; cursor: default; }
.tool-btn svg { width: 17px; height: 17px; }
.tool-btn.on { color: #fff; background: var(--bad); animation: pulse 1.2s ease-in-out infinite; }
.tool-btn.ok { color: var(--ok); }
.send { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), #ff8a5c); box-shadow: 0 6px 18px -6px rgba(255,90,110,.8); }
.send svg { width: 17px; height: 17px; stroke-width: 2.6; transition: transform .2s var(--ease); }
.send:not(:disabled):hover svg { transform: translateY(-2px); }
.send:disabled { background: var(--raise-2); box-shadow: none; }
.send.stop { background: var(--fg); box-shadow: none; }
.box.drop { border-color: var(--accent); background: var(--accent-soft); }
.box.listening { border-color: var(--bad); box-shadow: 0 0 0 3px rgba(255,107,107,.15); }

/* the model list */
.menu.models { width: min(340px, calc(100vw - 16px)); max-height: min(460px, 70vh); overflow-y: auto; }
.m-head { font-size: 12px; color: var(--muted); padding: 6px 10px 4px; }
.m-group { font-size: 11.5px; color: var(--faint); padding: 10px 10px 3px; letter-spacing: .02em; }
.menu .m-opt { align-items: flex-start; gap: 10px; padding: 8px 10px; }
.m-opt.on { background: var(--accent-soft); }
.m-opt.down { opacity: .55; }
.m-ico { width: 28px; height: 28px; flex: none; border-radius: 8px; display: grid; place-items: center; background: var(--raise-2); color: var(--accent); }
.m-ico.auto { background: linear-gradient(135deg, var(--accent), #8a6cff); color: #fff; }
.m-ico svg { width: 15px !important; height: 15px !important; color: inherit !important; }
.m-text { display: grid; gap: 1px; flex: 1; min-width: 0; }
.m-text b { font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.m-text span { font-size: 12px; color: var(--muted); }
.m-text .tag { font-size: 10.5px; font-weight: 500; padding: 0 6px; border-radius: 999px; background: var(--raise-2); color: var(--fg-2); }
.m-tick { width: 16px !important; height: 16px !important; color: var(--accent) !important; margin-top: 6px; }
.m-foot { font-size: 11.5px; color: var(--faint); padding: 8px 10px 6px; border-top: 1px solid var(--line); margin-top: 4px; line-height: 1.45; }

/* attached files */
.att-chips { display: flex; flex-wrap: wrap; gap: 6px; padding-bottom: 6px; }
.att { display: inline-flex; align-items: center; gap: 6px; max-width: 220px; background: var(--raise); border: 1px solid var(--line-2); border-radius: 10px; padding: 3px 4px 3px 8px; font-size: 12.5px; animation: rise .25s var(--ease) both; }
.att.pic { padding-left: 3px; }
.att img { width: 30px; height: 30px; border-radius: 7px; object-fit: cover; display: block; }
.att svg { width: 14px; height: 14px; color: var(--muted); flex: none; }
.att-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--fg-2); }
.att-x { border: 0; background: none; color: var(--faint); width: 20px; height: 20px; display: grid; place-items: center; border-radius: 6px; flex: none; }
.att-x:hover { color: var(--fg); background: var(--raise-2); }
.att-x svg { width: 12px; height: 12px; }
.u-pics { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; margin-bottom: 4px; }
.u-pics img { width: 84px; height: 64px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line-2); }

/* voice */
.voice { display: flex; align-items: center; gap: 10px; min-height: 32px; }
.v-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--bad); animation: pulse 1s infinite; flex: none; }
.v-bars { flex: 1; height: 26px; display: flex; align-items: center; gap: 3px; }
.v-bars i { flex: 1; height: 12%; min-height: 3px; border-radius: 2px; background: var(--accent); opacity: .85; transition: height .12s; }
.v-time { font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--muted); }
.v-wait { color: var(--muted); font-size: 13.5px; }

/* computer / phone: a soft cross-fade instead of a jump */
.canvas { transition: opacity .16s ease, transform .16s ease; }
.canvas.switching { opacity: 0; transform: scale(.985); }
.canvas.phone .frame { animation: phone-in .35s var(--ease) both; }
@keyframes phone-in { from { transform: translateY(10px) scale(.97); opacity: 0; } }
.browser-bar .seg button { transition: color .15s, background .2s; }

/* the answer while it is written: words arrive softly */
.answer .enter { animation: fade .5s ease-out both; }
.answer.typing > :last-child::after { width: 6px; height: 6px; animation: pulse 1.2s ease-in-out infinite; }

/* ===== compact: smaller controls, more room for the chat and the site ===== */
.top { height: 46px; gap: 6px; }
.home { height: calc(100% - 46px); }
.studio { height: calc(100% - 46px); }
.top .icon-btn, .browser-bar .icon-btn { width: 30px; height: 30px; border-radius: 8px; }
.top .icon-btn svg, .browser-bar .icon-btn svg { width: 16px; height: 16px; }
.site-ico { width: 24px; height: 24px; border-radius: 7px; }
.site-ico svg { width: 13px; height: 13px; }
.title-edit { font-size: 14px; padding: 3px 7px; }
.top .btn { padding: 5px 11px; font-size: 13px; border-radius: 8px; gap: 6px; }
.top .btn svg { width: 14px; height: 14px; }
.avatar { width: 28px; height: 28px; font-size: 12px; }
.brand { font-size: 15px; gap: 7px; } .brand svg { width: 20px; height: 20px; }
.products a { font-size: 12.5px; padding: 3px 9px; }
.usage-chip { font-size: 12px; }

.browser-bar { padding: 6px 8px; gap: 5px; }
.address { min-height: 28px; padding: 3px 4px 3px 10px; font-size: 12.5px; border-radius: 8px; }
.address svg { width: 12px; height: 12px; }
.issues { font-size: 11.5px; padding: 1px 8px; }
.browser-bar .seg { padding: 2px; border-radius: 8px; }
.browser-bar .seg button { padding: 3px 8px; font-size: 12px; gap: 5px; border-radius: 6px; }
.browser-bar .seg svg { width: 13px; height: 13px; }
.progress { top: 40px; }

.log { font-size: 14px; gap: 16px; padding: 16px 16px 10px; }
.msg-user { font-size: 14px; padding: 7px 12px; }
.who { font-size: 12px; } .who-ico { width: 20px; height: 20px; border-radius: 6px; } .who-ico svg { width: 12px; height: 12px; }
.work-head { font-size: 12.5px; gap: 6px; }
.work-head .wave { width: 15px; height: 15px; }
.step { font-size: 12px; padding: 3px 8px; }
.step svg { width: 13px; height: 13px; }
.act, .foot .act { width: 24px; height: 24px; border-radius: 6px; }
.act svg { width: 13px; height: 13px; }
.foot { font-size: 11.5px; }

.composer { padding: 0 12px 12px; gap: 6px; }
.box { padding: 8px 8px 6px 12px; border-radius: 14px; }
.box textarea { font-size: 14px; min-height: 22px; }
.box .row { margin-top: 2px; gap: 2px; }
.model-pill { font-size: 11.5px; padding: 2px 7px 2px 6px; gap: 4px; }
.model-pill .mi { width: 12px; height: 12px; }
.model-pill .chev { width: 10px; height: 10px; }
.tool-btn { width: 28px; height: 28px; }
.tool-btn svg { width: 15px; height: 15px; }
.send { width: 28px; height: 28px; }
.send svg { width: 14px; height: 14px; }
.ideas { gap: 5px; }
.idea { font-size: 11.5px; padding: 3px 9px; }
.att img { width: 24px; height: 24px; }
.att { font-size: 12px; }

.menu { min-width: 220px; font-size: 13.5px; }
.menu button { padding: 6px 9px; }
.m-ico { width: 24px; height: 24px; border-radius: 7px; }
.m-ico svg { width: 13px !important; height: 13px !important; }
.mobile-tabs button { padding: 5px; font-size: 13px; }

/* ===== home: alive, not empty ===== */
.home { position: relative; }
.aurora { position: absolute; inset: 0 0 auto 0; height: 620px; overflow: hidden; pointer-events: none; z-index: 0; }
.aurora i { position: absolute; width: 520px; height: 520px; border-radius: 50%; filter: blur(90px); opacity: .22; animation: drift 18s ease-in-out infinite alternate; }
.aurora i:nth-child(1) { background: #ff5a6e; left: 12%; top: -220px; }
.aurora i:nth-child(2) { background: #8a6cff; right: 8%; top: -160px; animation-duration: 22s; animation-delay: -6s; }
.aurora i:nth-child(3) { background: #ff9a5c; left: 42%; top: 40px; width: 380px; height: 380px; opacity: .12; animation-duration: 26s; }
@keyframes drift { 0% { transform: translate(0, 0) scale(1); } 50% { transform: translate(60px, 40px) scale(1.12); } 100% { transform: translate(-40px, 20px) scale(.95); } }
.home > section { position: relative; z-index: 1; }
.hero { padding: 72px 24px 24px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px !important; color: var(--fg-2) !important; margin: 0 0 18px !important;
  padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(31,31,30,.7); backdrop-filter: blur(8px); animation: rise .5s var(--ease) both; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 0 rgba(124,207,139,.6); animation: ping 2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 7px rgba(124,207,139,0); } 100% { box-shadow: 0 0 0 0 rgba(124,207,139,0); } }
.prompt { background: rgba(31,31,30,.82); backdrop-filter: blur(12px); box-shadow: 0 24px 60px -24px rgba(0,0,0,.6); }
.prompt textarea { min-height: 72px; }
.prompt .btn.primary { padding: 7px 14px; font-size: 14px; }
.sec-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 0 0 14px; }
.sec-head h2 { margin: 0; font-size: 17px; }
.sec-head span { font-size: 13px; color: var(--faint); }
.gallery { max-width: 1100px; margin: 0 auto; padding: 28px 24px 8px; animation: fade .6s .25s ease-out both; }
.tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 12px; }
.tpl { display: grid; gap: 0; padding: 0; border: 1px solid var(--line); border-radius: 14px; background: var(--bg-2); overflow: hidden; text-align: left; color: var(--fg);
  transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; animation: rise .45s var(--ease) both; }
.tpl:nth-child(2) { animation-delay: .04s; } .tpl:nth-child(3) { animation-delay: .08s; } .tpl:nth-child(4) { animation-delay: .12s; } .tpl:nth-child(5) { animation-delay: .16s; } .tpl:nth-child(6) { animation-delay: .2s; }
.tpl:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: 0 16px 34px -18px rgba(0,0,0,.7); }
.tpl-pic { position: relative; height: 92px; display: grid; align-content: start; gap: 6px; padding: 10px 12px; overflow: hidden; }
.tpl-pic i { display: block; border-radius: 4px; background: currentColor; }
.tp-nav { width: 34%; height: 5px; opacity: .55; } .tp-title { width: 72%; height: 9px; margin-top: 6px; } .tp-line { width: 52%; height: 5px; opacity: .5; }
.tp-btn { width: 30%; height: 10px; border-radius: 999px !important; margin-top: 2px; }
.tp-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; margin-top: 4px; } .tp-cards i { height: 16px; opacity: .3; }
.tpl:hover .tp-btn { animation: nudge .6s var(--ease); }
@keyframes nudge { 50% { transform: translateX(4px); } }
.tpl-text { display: grid; padding: 9px 12px 11px; gap: 1px; } .tpl-text b { font-size: 14px; } .tpl-text span { font-size: 12px; color: var(--muted); }
.tone-coffee .tpl-pic { background: linear-gradient(135deg, #f3e6d6, #e2c3a2); color: #6b3f22; }
.tone-barber .tpl-pic { background: linear-gradient(135deg, #1f2430, #2e3646); color: #d9b26a; }
.tone-folio .tpl-pic { background: linear-gradient(135deg, #f4f4f2, #dcdcd8); color: #1d1d1d; }
.tone-tutor .tpl-pic { background: linear-gradient(135deg, #e7f0ff, #c6d9ff); color: #2c5bd8; }
.tone-invite .tpl-pic { background: linear-gradient(135deg, #fbe9ef, #f3c9d6); color: #a8486a; }
.tone-game .tpl-pic { background: linear-gradient(135deg, #0d0f1f, #1b1e3d); color: #39f5c4; }
.projects { padding-top: 26px; }
.steps-3 { max-width: 1100px; margin: 0 auto; padding: 8px 24px 64px; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.steps-3 > div { display: grid; gap: 4px; padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--bg-2), transparent); }
.s3-n { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--accent); background: var(--accent-soft); margin-bottom: 6px; }
.steps-3 b { font-size: 14.5px; } .steps-3 span:not(.s3-n) { font-size: 13px; color: var(--muted); line-height: 1.5; }
.chips { display: none; }

/* ===== chats of a site ===== */
.top-sep { color: var(--faint); margin: 0 -2px; }
.chat-btn { display: inline-flex; align-items: center; gap: 6px; min-width: 0; max-width: 260px; border: 0; background: none; color: var(--fg-2); font-size: 13px; padding: 4px 8px; border-radius: 8px; }
.chat-btn:hover { background: var(--raise); color: var(--fg); }
.chat-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-btn .ci { width: 14px; height: 14px; flex: none; color: var(--muted); }
.chat-btn .chev { width: 11px; height: 11px; flex: none; opacity: .7; }
.menu.chats { width: min(320px, calc(100vw - 16px)); max-height: min(440px, 70vh); overflow-y: auto; }
.menu .new-chat { color: var(--accent-2); font-weight: 600; }
.menu .new-chat svg { color: var(--accent); }
.chat-row { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 8px; cursor: pointer; }
.chat-row:hover, .chat-row:focus-visible { background: var(--raise-2); outline: none; }
.chat-row.on { background: var(--accent-soft); }
.chat-row .ci { width: 15px; height: 15px; color: var(--muted); flex: none; }
.cr-text { flex: 1; min-width: 0; display: grid; } .cr-text b { font-weight: 500; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-text span { font-size: 11.5px; color: var(--faint); }
.menu .row-act { width: 26px; height: 26px; padding: 0; display: grid; place-items: center; border-radius: 7px; opacity: 0; color: var(--muted); }
.chat-row:hover .row-act, .chat-row:focus-within .row-act { opacity: 1; }
.menu .row-act:hover { background: var(--raise); color: var(--fg); } .menu .row-act.del:hover { color: var(--bad); }
.menu .row-act svg { width: 13px; height: 13px; }
.dialog.small { width: min(420px, 100%); }
.dialog .input { margin: 4px 0 16px; }

/* ===== times on messages, repeats in the work list ===== */
.stamp { font-size: 11px; color: var(--faint); white-space: nowrap; }
.acts .stamp { margin-right: 4px; align-self: center; }
.user-row .acts { opacity: 1; } .user-row .acts .act { opacity: 0; transition: opacity .15s; } .user-row:hover .acts .act, .user-row:focus-within .acts .act { opacity: 1; }
.foot .stamp { margin-left: 8px; } .foot .dur::before { content: '· '; }
.step .times { font-size: 11px; color: var(--muted); background: var(--raise-2); padding: 0 6px; border-radius: 999px; flex: none; }

/* ===== publishing ===== */
.dialog.pub { width: min(720px, 100%); padding: 22px; position: relative; }
.pub-head { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 18px; padding-right: 30px; }
.pub-head h2 { margin: 0 0 3px; font-size: 19px; } .pub-head p { margin: 0; color: var(--muted); font-size: 13.5px; }
.pub-ico { width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--accent), #8a6cff); box-shadow: 0 10px 26px -10px rgba(255,90,110,.8); }
.pub-ico svg { width: 21px; height: 21px; }
.pub-ico.ok { background: linear-gradient(135deg, #3fbf7f, #7ccf8b); box-shadow: 0 10px 26px -10px rgba(124,207,139,.7); }
.pub-x { position: absolute; top: 14px; right: 14px; }
.pub-grid { display: grid; grid-template-columns: 250px 1fr; gap: 18px; margin-bottom: 18px; }
.pub-thumb { height: 170px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line-2); background: #fff; position: relative; display: grid; place-items: center; color: #777; font-size: 13px; }
.pub-thumb iframe { position: absolute; left: 0; top: 0; width: 1280px; height: 870px; border: 0; transform: scale(.195); transform-origin: 0 0; pointer-events: none; }
.pub-side { display: grid; gap: 8px; align-content: start; min-width: 0; }
.pub-label { font-size: 12px; color: var(--muted); }
.slug-row { display: flex; align-items: center; background: var(--bg); border: 1px solid var(--line-2); border-radius: 10px; overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.slug-row:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.slug-host { padding: 9px 0 9px 11px; color: var(--faint); font-family: var(--mono); font-size: 12.5px; white-space: nowrap; }
.slug-in { flex: 1; min-width: 60px; border: 0; background: none; outline: none; padding: 9px 11px 9px 1px; font-family: var(--mono); font-size: 12.5px; color: var(--fg); }
.pub-checks { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; }
.pub-checks li { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--fg-2); }
.pub-checks svg { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.pub-checks .ok svg { color: var(--ok); } .pub-checks .warn svg { color: var(--warn); }
.pub-links { display: flex; gap: 6px; flex-wrap: wrap; }
.pub-links .btn, .url-row .btn { text-decoration: none; }
.pub-note { margin: 4px 0 0; font-size: 12.5px; color: var(--warn); }
.btn.big { padding: 9px 18px; font-size: 14.5px; }
.btn.danger { color: var(--bad); }
.btn .wave { width: 16px; height: 16px; color: currentColor; }
.btn .wave path { stroke-dasharray: 40; animation: draw 1.2s ease-in-out infinite; }
.dialog.pub.celebrate .pub-ico { animation: pop-up .6s var(--ease); }
.dialog.pub.celebrate .url-row { animation: glow 1.6s ease-out; }
@keyframes glow { 0% { box-shadow: 0 0 0 0 rgba(124,207,139,.55); } 100% { box-shadow: 0 0 0 14px rgba(124,207,139,0); } }
@media (max-width: 640px) { .pub-grid { grid-template-columns: 1fr; } .pub-thumb { height: 150px; } .pub-thumb iframe { transform: scale(.27); } }

/* ===== settings ===== */
.dialog.settings { width: min(820px, 100%); height: min(600px, 88vh); padding: 0; display: grid; grid-template-columns: 210px 1fr; overflow: hidden; }
.set-side { background: var(--bg); border-right: 1px solid var(--line); padding: 16px 10px; display: grid; align-content: start; gap: 10px; }
.set-title { font-weight: 700; font-size: 16px; padding: 4px 10px 6px; }
.set-nav { display: grid; gap: 2px; }
.set-nav button { display: flex; align-items: center; gap: 10px; border: 0; background: none; color: var(--fg-2); text-align: left; padding: 8px 10px; border-radius: 9px; font-size: 13.5px; }
.set-nav button:hover { background: var(--raise); color: var(--fg); }
.set-nav button[aria-current="true"] { background: var(--raise-2); color: var(--fg); }
.set-nav svg { width: 16px; height: 16px; color: var(--muted); }
.set-nav button[aria-current="true"] svg { color: var(--accent); }
.set-main { position: relative; min-width: 0; overflow: hidden; display: grid; }
.set-x { position: absolute; top: 10px; right: 10px; z-index: 2; }
.set-pane { overflow-y: auto; padding: 22px 26px 26px; display: grid; gap: 12px; align-content: start; animation: fade .2s; }
.set-pane h3 { margin: 8px 0 0; font-size: 16px; } .set-pane h3:first-child { margin-top: 0; }
.set-note { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.set-row { display: flex; align-items: center; gap: 16px; padding: 12px 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); flex-wrap: wrap; }
.set-text { flex: 1 1 220px; display: grid; gap: 2px; } .set-text b { font-weight: 600; font-size: 14px; } .set-text span { font-size: 12.5px; color: var(--muted); }
.set-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.set-list { display: grid; gap: 4px; }
.set-list .m-opt { display: flex; width: 100%; align-items: flex-start; gap: 10px; text-align: left; border: 1px solid var(--line); background: var(--bg); color: var(--fg); padding: 10px 12px; border-radius: 12px; }
.set-list .m-opt:hover { border-color: var(--line-2); }
.set-list .m-opt.on { border-color: var(--accent); background: var(--accent-soft); }
.set-links { display: flex; gap: 8px; flex-wrap: wrap; } .set-links .btn { text-decoration: none; }
.acct-card { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); }
.acct-card > div { display: grid; gap: 1px; min-width: 0; } .acct-card b { font-size: 15px; } .acct-card span { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.acct-card .plan { color: var(--accent-2); }
.avatar.big { width: 46px; height: 46px; font-size: 18px; }
.usage-box { padding: 14px; border-radius: 12px; background: var(--bg); border: 1px solid var(--line); display: grid; gap: 8px; }
.u-row { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13.5px; } .u-row span { color: var(--muted); font-size: 12.5px; }
.u-bar { height: 6px; border-radius: 6px; background: var(--raise-2); overflow: hidden; } .u-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #ff9a5c); border-radius: 6px; }
.usage-box p { margin: 0; font-size: 12.5px; color: var(--faint); }
.input.rules { min-height: 120px; resize: vertical; line-height: 1.5; }
.how { margin: 0; padding-left: 20px; display: grid; gap: 6px; font-size: 13.5px; color: var(--fg-2); }
.switch { width: 38px; height: 22px; border-radius: 999px; border: 0; padding: 0; position: relative; flex: none; background: var(--raise-2); transition: background .2s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.35); transition: transform .2s var(--ease); }
.switch.on { background: var(--accent); } .switch.on::after { transform: translateX(16px); }
.set-pane .seg { justify-self: start; }
@media (max-width: 700px) {
  .dialog.settings { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); height: 92vh; }
  .set-side { border-right: 0; border-bottom: 1px solid var(--line); padding: 10px; }
  .set-title { display: none; } .set-nav { display: flex; overflow-x: auto; } .set-nav button { white-space: nowrap; }
  .set-pane { padding: 18px; }
}
@media (max-width: 820px) { .top-sep, .chat-btn span { display: none; } }
.title-edit { width: auto; max-width: 340px; field-sizing: content; min-width: 4ch; }
.pub-grid { grid-template-columns: 250px minmax(0, 1fr); }
.url-row { margin-bottom: 0; min-width: 0; }
@media (max-width: 640px) { .pub-grid { grid-template-columns: minmax(0, 1fr); } }

/* -- security: passwords, email hints, sessions --------------------------------------------- */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; padding-right: 40px; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; display: grid; place-items: center;
  background: none; border: 0; border-radius: 8px; color: var(--faint); }
.pw-eye:hover { color: var(--fg-2); background: var(--raise); }
.pw-eye svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.pw-eye[aria-pressed="true"] { color: var(--accent-2); }
.pw-meter { display: grid; gap: 6px; margin-top: 2px; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.pw-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.pw-bar i { height: 4px; border-radius: 4px; background: var(--raise-2); transition: background .25s var(--ease); }
.pw-meter[data-score="0"] .pw-bar i:nth-child(-n+1) { background: var(--bad); }
.pw-meter[data-score="1"] .pw-bar i:nth-child(-n+1) { background: var(--bad); }
.pw-meter[data-score="2"] .pw-bar i:nth-child(-n+2) { background: var(--warn); }
.pw-meter[data-score="3"] .pw-bar i:nth-child(-n+3) { background: var(--ok); }
.pw-meter[data-score="4"] .pw-bar i { background: var(--ok); }
.pw-meter[data-score="0"] b, .pw-meter[data-score="1"] b { color: var(--bad); }
.pw-meter[data-score="2"] b { color: var(--warn); } .pw-meter[data-score="3"] b, .pw-meter[data-score="4"] b { color: var(--ok); }
.mail-hint { font-size: 13px; color: var(--fg-2); line-height: 1.45; animation: rise .25s var(--ease) both; }
.mail-hint.bad { color: var(--warn); }
.mail-hint .link { font-weight: 600; }
.label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.link.small { font-size: 13px; }
.auth-safe { display: flex; gap: 8px; align-items: flex-start; margin: 16px 0 0 !important; font-size: 12.5px; line-height: 1.45; color: var(--faint) !important; }
.auth-safe svg { width: 15px; height: 15px; flex: none; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 1.7; }
input[readonly] { opacity: .7; }

.sec { display: grid; gap: 14px; }
.sec-loading { color: var(--muted); font-size: 13px; padding: 10px 0; }
.sec h4 { margin: 8px 0 0; font-size: 13px; font-weight: 600; color: var(--fg-2); text-transform: none; }
.sec-checks { list-style: none; margin: 0; padding: 12px 14px; display: grid; gap: 7px; border-radius: 12px;
  background: linear-gradient(180deg, rgba(124,207,139,.07), transparent); border: 1px solid rgba(124,207,139,.18); }
.sec-checks li { display: flex; gap: 9px; align-items: center; font-size: 13.5px; color: var(--fg-2); }
.sec-checks svg { width: 16px; height: 16px; flex: none; fill: none; stroke: var(--ok); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sec-checks li.warn svg { stroke: var(--warn); stroke-width: 1.8; }
.set-block { display: grid; gap: 0; }
.set-block:has(.sec-form:not([hidden])) > .set-row { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
.sec-form { padding: 14px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 12px 12px; background: var(--bg-2); animation: rise .25s var(--ease) both; }
.sec-form form { display: grid; gap: 10px; }
.sec-form .err { margin: 0; }
.sec-form.danger { border-color: rgba(255,107,107,.3); }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 4px; }
.sec-head h4 { margin: 0; }
.sess { display: grid; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.sess-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; background: var(--bg); }
.sess-row + .sess-row { border-top: 1px solid var(--line); }
.sess-ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--raise); color: var(--fg-2); flex: none; }
.sess-row.me .sess-ico { background: var(--accent-soft); color: var(--accent-2); }
.sess-ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sess-text { display: grid; gap: 2px; min-width: 0; flex: 1; }
.sess-text b { font-size: 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sess-text span { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.events { display: grid; gap: 2px; max-height: 260px; overflow: auto; }
.ev { display: grid; gap: 1px; padding: 7px 10px; border-left: 2px solid var(--line-2); }
.ev b { font-size: 13px; font-weight: 500; color: var(--fg-2); } .ev span { font-size: 12px; color: var(--faint); }
.ev.bad { border-left-color: var(--bad); } .ev.bad b { color: var(--bad); }
.danger-title { color: var(--bad) !important; margin-top: 14px !important; }
.btn.danger-fill { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.danger-fill:disabled { opacity: .45; }
.btn.danger-fill svg { stroke: currentColor; }
