/* Setup → Website: the website builder (web/js/pages/website.js) */
/* the builder fills the screen, like the course builder: top bar (Exit, tabs, actions), then the work area */
.ws-app { position: fixed; inset: 0; z-index: 40; background: var(--page); display: flex; flex-direction: column; }
.ws-top { flex: none; display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 6px 14px; padding: 8px 14px; min-height: 58px; box-sizing: border-box; background: var(--card); border-bottom: 1px solid var(--line); }
.ws-name { margin: 0; display: inline-flex; align-items: center; gap: 8px; font: 600 18px var(--serif, var(--sans)); color: var(--ink); white-space: nowrap; padding-right: 12px; border-right: 1px solid var(--line); }
.ws-name .jb-ico { width: 20px; height: 20px; color: var(--sage-ink, var(--sage)); }
.ws-tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.ws-tabs::-webkit-scrollbar { display: none; }
.ws-tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--ink-2, var(--ink)); font-weight: 600; font-size: 14px; white-space: nowrap; }
.ws-tabs a .jb-ico { width: 17px; height: 17px; }
.ws-tabs a:hover { background: var(--sage-mist); }
.ws-tabs a[aria-current="page"] { background: var(--sage-mist); color: var(--sage-ink, var(--ink)); box-shadow: inset 0 0 0 1px var(--sage); }
.ws-actions { display: flex; gap: 8px; align-items: center; justify-content: flex-end; flex-wrap: nowrap; }
.ws-body { flex: 1; min-height: 0; }
.ws-body.pad { overflow: auto; padding: 20px clamp(16px, 3vw, 40px) 40px; }
.ws-body.pad > * { max-width: 1100px; margin-left: auto; margin-right: auto; }
.ws-body.ed { display: flex; flex-direction: column; padding: 12px 14px 14px; }
.ws-body.ed > #ws-ed { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.ws-app .ws-ed { flex: 1; height: auto; min-height: 0; margin-top: 0; grid-template-columns: 240px minmax(0, 1fr) 360px; }
@media (max-width: 1320px) { .ws-top { grid-template-columns: auto auto 1fr; } .ws-tabs { grid-column: 1 / -1; grid-row: 2; } }
@media (max-width: 980px) { .ws-top .hide-sm { display: none; } }
@media (max-width: 640px) { .ws-name span, .ws-exit span { display: none; } .ws-name { padding-right: 8px; } .ws-top { gap: 6px 8px; padding: 6px 10px; } .ws-actions .jb-pill { display: none; } }
.ws-tab { margin-top: 0; }
.ws-tab .jb-stack > .jb-card { max-width: 920px; }

/* start screen */
.ws-start { margin-top: 18px; max-width: 980px; }
.ws-start-ai, .ws-templates { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-top: 10px; }
.ws-choice { text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: var(--r-md, 14px); padding: 16px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; font: inherit; color: var(--ink); box-shadow: var(--shadow); }
.ws-choice:hover { border-color: var(--sage); }
.ws-choice b { font-size: 16px; }
.ws-choice span { color: var(--ink-3); font-size: 14px; line-height: 1.4; }
.ws-choice.ai { background: linear-gradient(135deg, var(--card), var(--sage-mist)); }
.ws-choice .jb-ico { width: 24px; height: 24px; color: var(--sage-ink, var(--sage)); }
.ws-choice.rec { border-color: var(--sage); box-shadow: 0 0 0 1px var(--sage), var(--shadow); }
.ws-rec { align-self: flex-start; font-style: normal; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--sage-ink, var(--sage)); background: var(--sage-mist); border-radius: 999px; padding: 2px 10px; }

/* editor layout: pages | preview | panel */
.ws-ed { display: grid; grid-template-columns: 220px minmax(0, 1fr) 340px; gap: 14px; margin-top: 16px; height: calc(100vh / var(--zf, 1) - 230px); height: calc(100dvh / var(--zf, 1) - 230px); min-height: 560px; }
.ws-pages, .ws-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-md, 14px); padding: 12px; overflow: auto; }
.ws-plist { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.ws-plist li { display: flex; align-items: center; gap: 4px; border-radius: 10px; }
.ws-plist li.on { background: var(--sage-mist); }
.ws-pbtn { flex: 1; min-width: 0; text-align: left; border: 0; background: none; padding: 8px; font: 600 14px var(--sans); color: var(--ink); cursor: pointer; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.ws-pbtn small { font-weight: 400; color: var(--ink-3); font-size: 12px; }
.ws-pmove { display: none; }
.ws-plist li:hover .ws-pmove, .ws-plist li.on .ws-pmove { display: inline-flex; }
.ws-pmove .jb-iconbtn, .ws-ph .jb-iconbtn, .ws-li-h .jb-iconbtn, .jb-iconbtn.sm { width: 28px; height: 28px; }
.ws-pmove .jb-iconbtn:first-child .jb-ico, .ws-bact [data-act="up"] .jb-ico, .ws-li-h [data-li$=":up"] .jb-ico { transform: none; }
.ws-hint { font-size: 13px; }
.ws-pages > .jb-row-between { flex-wrap: nowrap; align-items: center; }
.ws-pages > .jb-row-between > :first-child { flex: 1 1 auto; }

.ws-stage { display: flex; flex-direction: column; min-width: 0; }
.ws-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-bottom: 8px; }
.ws-title { font-size: 16px; }
.ws-path { font-size: 13px; }
.ws-bar-r { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ws-frame-wrap { flex: 1; min-height: 0; background: #e9e6df; border: 1px solid var(--line); border-radius: var(--r-md, 14px); overflow: hidden; display: flex; justify-content: center; }
.ws-frame { width: 100%; height: 100%; border: 0; background: #fff; }
.ws-frame-wrap.phone { padding: 16px 0; }
.ws-frame-wrap.phone .ws-frame { width: 390px; max-width: 100%; border-radius: 22px; box-shadow: 0 6px 30px rgba(0,0,0,.18); }

/* side panel */
.ws-ph { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.ws-ph b { font-size: 16px; display: inline-flex; align-items: center; gap: 6px; }
.ws-bact { display: inline-flex; gap: 4px; }
.ws-empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; color: var(--ink-3); padding: 30px 8px; }
.ws-empty .jb-ico { width: 34px; height: 34px; }
.ws-form { display: flex; flex-direction: column; gap: 12px; }
.ws-form .jb-field { display: flex; flex-direction: column; gap: 4px; }
.ws-form .jb-field > span { font-weight: 600; font-size: 13px; color: var(--ink-2); }
.ws-form input:not([type=checkbox]):not([type=radio]), .ws-form textarea, .ws-form select { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font: 15px var(--sans); background: #fff; color: var(--ink); }
.ws-live { background: var(--sage-mist); color: var(--sage-ink, var(--ink)); border-radius: 10px; padding: 8px 10px; font-size: 13px; display: flex; gap: 6px; align-items: flex-start; margin: 0 0 10px; }
.ws-live .jb-ico { flex: none; width: 16px; height: 16px; margin-top: 1px; }
.ws-grp { margin: 14px 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.ws-blocklib { display: grid; gap: 6px; }
.ws-libitem { text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 10px; cursor: pointer; font: inherit; color: var(--ink); display: flex; flex-direction: column; gap: 2px; }
.ws-libitem:hover { border-color: var(--sage); background: var(--sage-mist); }
.ws-libitem span { font-size: 12px; color: var(--ink-3); line-height: 1.35; }
.ws-slug { display: flex; align-items: center; gap: 4px; }
.ws-slug span { color: var(--ink-3); }

.ws-rt-bar { display: flex; flex-wrap: wrap; gap: 4px; }
.ws-rt-bar button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 3px 8px; font: 13px var(--sans); cursor: pointer; color: var(--ink-2); }
.ws-rt { min-height: 110px; max-height: 340px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #fff; font: 15px/1.5 var(--sans); outline: none; }
.ws-rt:focus { border-color: var(--sage); }
.ws-rt p { margin: 0 0 8px; } .ws-rt h3 { font-size: 16px; margin: 8px 0 4px; }

.ws-pic { display: flex; gap: 10px; align-items: center; margin-bottom: 6px; }
.ws-pic img, .ws-pic-ph { width: 84px; height: 60px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); flex: none; }
.ws-pic-ph { display: flex; align-items: center; justify-content: center; color: var(--ink-3); background: var(--chip-soft); }
.ws-pic-b { display: flex; flex-wrap: wrap; gap: 4px; }
.ws-people { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow: auto; }
.ws-people .jb-check { font-size: 14px; }
.ws-list { display: flex; flex-direction: column; gap: 8px; }
.ws-li { border: 1px solid var(--line); border-radius: 10px; padding: 8px; display: flex; flex-direction: column; gap: 8px; background: var(--chip-soft); }
.ws-li-h { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.ws-li-h b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-li-h span { display: inline-flex; gap: 3px; }

/* AI chat */
.ws-chat { display: flex; flex-direction: column; gap: 10px; }
.ws-turns { display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh / var(--zf, 1) - 520px); max-height: calc(100dvh / var(--zf, 1) - 520px); min-height: 160px; overflow: auto; }
.ws-turn { border-radius: 12px; padding: 8px 10px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.ws-turn.user { background: var(--sage-mist); align-self: flex-end; max-width: 90%; }
.ws-turn.assistant { background: var(--chip-soft); }
.ws-turn.pending { flex-direction: row; align-items: center; color: var(--ink-3); }
.ws-tips { display: flex; flex-direction: column; gap: 6px; }
.ws-tips button { text-align: left; border: 1px dashed var(--line); background: none; border-radius: 10px; padding: 6px 10px; font: 13px var(--sans); color: var(--ink-2); cursor: pointer; }
.ws-ask textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font: 15px var(--sans); resize: vertical; margin-bottom: 6px; }
.ws-dots { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--sage); border-top-color: transparent; animation: ws-spin .8s linear infinite; }

/* AI build sheet */
.ws-seg { margin-bottom: 14px; }
.ws-progress { display: flex; flex-direction: column; gap: 10px; }
.ws-spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--sage-mist); border-top-color: var(--sage); animation: ws-spin .9s linear infinite; }
@keyframes ws-spin { to { transform: rotate(360deg); } }
.ws-log { margin: 0; padding-left: 20px; max-height: 300px; overflow: auto; font-size: 14px; color: var(--ink-2); display: flex; flex-direction: column; gap: 4px; }
.ws-done { border-top: 1px solid var(--line); padding-top: 12px; }

/* design, domain, messages */
.ws-design { display: flex; flex-direction: column; gap: 14px; max-width: 920px; margin-top: 18px; }
.ws-styles { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.ws-style { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; }
.ws-style:has(input:checked) { border-color: var(--sage); background: var(--sage-mist); }
.ws-style input { accent-color: var(--sage); }
.ws-style span { font-size: 13px; color: var(--ink-3); }
.ws-dns code { font-size: 13px; overflow-wrap: anywhere; }
.ws-dns td { vertical-align: middle; }
.ws-1line { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60ch; }
.ws-inq { cursor: pointer; }
.ws-inq.done { opacity: .7; }

@media (max-width: 1180px) {
  .ws-ed, .ws-app .ws-ed { grid-template-columns: 200px minmax(0, 1fr); }
  .ws-panel { display: none; }
  .ws-ed.has-panel .ws-panel { display: block; position: fixed; right: 12px; top: 118px; bottom: 12px; width: min(380px, calc(100vw - 24px)); z-index: 40; box-shadow: 0 10px 40px rgba(0,0,0,.2); }
}
@media (max-width: 760px) {
  .ws-ed, .ws-app .ws-ed { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .ws-pages { max-height: 220px; }
  .ws-frame-wrap { height: calc(70vh / var(--zf, 1)); flex: none; }
  .ws-body.ed { overflow: auto; } .ws-app .ws-ed { flex: none; }
  .ws-ed.has-panel .ws-panel { left: 0; right: 0; top: auto; bottom: 0; width: auto; max-height: 75vh; border-radius: 18px 18px 0 0; padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
}

/* ------------------------------------------------------------------ AI build view (web/js/site-build-view.js) */
.jb-sheet.ws-building { width: min(1180px, 100%); height: calc(90vh / var(--zf, 1)); }
.jb-sheet.ws-building .body { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.ws-building .ws-progress { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.bv { display: flex; flex-direction: column; gap: 12px; flex: 1; min-height: 0; }
.bv-top { display: flex; align-items: center; gap: 12px; }
.bv-steps { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; flex: 1; flex-wrap: wrap; }
.bv-steps li { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; font: 600 13px var(--sans); color: var(--ink-3); background: var(--chip-soft); transition: background .3s, color .3s; }
.bv-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.bv-steps li.now { background: var(--maroon-wash); color: var(--maroon-text); }
.bv-steps li.now .bv-dot { background: var(--maroon); animation: bv-pulse 1.2s ease-in-out infinite; }
.bv-steps li.done { color: var(--sage-text, var(--ink-2)); }
.bv-steps li.done .bv-dot { background: var(--sage); }
.bv-eta { font: 600 13px/1 var(--sans); color: var(--maroon-text); background: var(--maroon-wash); padding: 6px 11px; border-radius: 999px; white-space: nowrap; }
.bv-eta:empty { display: none; }
.bv-bar { display: block; height: 4px; border-radius: 2px; background: #eeeae2; overflow: hidden; }
.bv-bar i { display: block; height: 100%; width: 0; border-radius: 2px; background: linear-gradient(90deg, var(--maroon), var(--sage)); transition: width .8s ease; }
.bv-pg.written .bv-bar i { background: var(--sage); }
.bv-time { font: 600 14px/1 var(--sans); color: var(--ink-3); font-variant-numeric: tabular-nums; }
@keyframes bv-pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--maroon) 50%, transparent); } 50% { box-shadow: 0 0 0 6px transparent; } }

.bv-win { flex: 1; min-height: 260px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 10px 40px rgba(0,0,0,.08); }
.bv-chrome { display: flex; align-items: center; gap: 12px; padding: 9px 12px; background: #f1efe9; border-bottom: 1px solid var(--line); }
.bv-lights { display: inline-flex; gap: 6px; } .bv-lights i { width: 10px; height: 10px; border-radius: 50%; background: #d9d4c8; }
.bv-url { flex: 1; max-width: 460px; margin: 0 auto; background: #fff; border-radius: 8px; padding: 5px 10px; font-size: 13px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.bv-url .jb-ico { width: 14px; height: 14px; }
.bv-nav { display: flex; align-items: center; gap: 16px; padding: 10px 18px; border-bottom: 1px solid var(--line); animation: bv-in .5s ease both; }
.bv-nav img { height: 30px; max-width: 140px; object-fit: contain; }
.bv-tabs { display: flex; gap: 14px; flex: 1; overflow: hidden; flex-wrap: wrap; height: 20px; }
.bv-tabs span { font-size: 13px; color: var(--ink-3); white-space: nowrap; position: relative; padding-right: 2px; }
.bv-tabs span.done { color: var(--ink); }
.bv-tabs span.done::after { content: ''; position: absolute; left: 0; right: 0; bottom: -3px; height: 2px; background: var(--maroon); animation: bv-grow .5s ease both; transform-origin: left; }
.bv-apply { background: var(--maroon); color: var(--on-maroon, #fff); font: 600 12px var(--sans); padding: 6px 12px; border-radius: 6px; }
.bv-stage { flex: 1; overflow: auto; padding: 18px; position: relative; background: linear-gradient(180deg, #fff, #faf9f6); }
.bv-cap { font: 600 12px var(--sans); text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); margin: 0 0 10px; display: flex; gap: 8px; align-items: baseline; }

/* reading: the old site's pages arrive as cards */
.bv-read { position: relative; }
.bv-found { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.bv-fc { display: flex; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 10px; background: #fff; animation: bv-pop .45s cubic-bezier(.2,.9,.3,1.2) both; animation-delay: var(--d, 0ms); position: relative; overflow: hidden; }
.bv-fc:last-child::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, color-mix(in srgb, var(--maroon) 14%, transparent) 50%, transparent 70%); animation: bv-sweep 1.4s ease-out 1; }
.bv-fimg { width: 64px; height: 64px; flex: none; border-radius: 8px; background: var(--chip-soft) center/cover no-repeat; display: flex; align-items: center; justify-content: center; font: 700 22px var(--serif, serif); color: var(--maroon-text); }
.bv-ftx { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bv-ftx b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bv-ftx small { font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bv-ftx em { font-size: 12px; color: var(--ink-2); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* planning */
.bv-plan { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; padding: 26px 10px; }
.bv-orbit { width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle, var(--maroon-wash), transparent 70%); position: relative; }
.bv-orbit::before { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid transparent; border-top-color: var(--maroon); border-right-color: var(--sage); animation: ws-spin 1.6s linear infinite; }
.bv-orbit .jb-ico { width: 28px; height: 28px; color: var(--maroon); animation: bv-breathe 2.4s ease-in-out infinite; }
.bv-big { font: 600 22px var(--serif, serif); margin: 0; }
.bv-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 760px; }
.bv-chips span i { width: 22px; height: 22px; border-radius: 50%; background: #ddd center/cover; flex: none; }
.bv-chips span { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 13px; animation: bv-pop .45s both, bv-float 3.2s ease-in-out infinite; animation-delay: var(--d), calc(var(--d) + .5s); }
.bv-skel { display: flex; gap: 12px; width: min(620px, 100%); margin-top: 8px; }
.bv-skel span { flex: 1; height: 70px; border-radius: 10px; background: linear-gradient(90deg, #f0ede6 25%, #faf8f3 50%, #f0ede6 75%); background-size: 200% 100%; animation: bv-shimmer 1.4s linear infinite; }

/* writing: one card per page, drawn section by section */
.bv-tag { font: italic 15px var(--serif, serif); color: var(--ink-3); margin: 0 0 12px; text-align: center; }
.bv-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.bv-pg { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 10px; display: flex; flex-direction: column; gap: 6px; animation: bv-pop .45s both; animation-delay: var(--d); transition: border-color .4s, box-shadow .4s; }
.bv-pg.written { border-color: color-mix(in srgb, var(--sage) 55%, var(--line)); box-shadow: 0 4px 18px rgba(0,0,0,.06); }
.bv-pg-h { display: flex; align-items: baseline; gap: 6px; }
.bv-pg-h b { font-size: 14px; } .bv-pg-h small { color: var(--ink-3); font-size: 12px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bv-pg-st { display: inline-flex; align-items: center; gap: 5px; font: 600 11px var(--sans); color: var(--ink-3); white-space: nowrap; }
.bv-pg.written .bv-pg-st { color: var(--sage-text, var(--sage)); } .bv-pg-st .jb-ico { width: 13px; height: 13px; }
.bv-pen { width: 8px; height: 8px; border-radius: 50%; background: var(--maroon); animation: bv-pulse 1.2s infinite; }
.bv-pg-about { margin: 0; font-size: 12px; color: var(--ink-3); line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bv-sheet { display: flex; flex-direction: column; gap: 5px; min-height: 110px; }
.bv-sk { height: 30px; border-radius: 6px; background: linear-gradient(90deg, #f0ede6 25%, #faf8f3 50%, #f0ede6 75%); background-size: 200% 100%; animation: bv-shimmer 1.3s linear infinite; }
.bv-sk:first-child { height: 52px; } .bv-sk.short { width: 60%; }
.bv-b { border-radius: 6px; padding: 7px 8px; background: #faf9f6; display: flex; flex-direction: column; gap: 4px; position: relative; animation: bv-build .4s cubic-bezier(.2,.9,.3,1.1) both; }
.bv-b i { font: 600 11px/1.25 var(--serif, serif); font-style: normal; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bv-ln { display: block; height: 4px; border-radius: 2px; background: #e5e1d8; } .bv-ln:nth-child(3n) { width: 70%; } .bv-ln:nth-child(3n+2) { width: 88%; }
.bv-hero { min-height: 58px; justify-content: flex-end; background: linear-gradient(135deg, var(--maroon), var(--sage)) center/cover; }
.bv-hero[style] { background-size: cover; background-position: center; }
.bv-hero i { color: #fff; font-size: 13px; white-space: normal; }
.bv-btns { display: flex; gap: 4px; } .bv-btns span { width: 30px; height: 8px; border-radius: 3px; background: #fff; opacity: .9; }
.bv-cta { background: var(--maroon); align-items: center; } .bv-cta i { color: var(--on-maroon, #fff); }
.bv-split { flex-direction: row; align-items: center; gap: 8px; } .bv-split > span:last-child { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.bv-pic { display: block; width: 46px; height: 32px; border-radius: 4px; background: #e5e1d8 center/cover no-repeat; flex: none; }
.bv-pic.wide { width: 100%; height: 44px; } .bv-media { display: flex; align-items: center; justify-content: center; color: var(--ink-3); } .bv-media .jb-ico { width: 16px; height: 16px; }
.bv-row { display: flex; gap: 4px; } .bv-row > * { flex: 1; } .bv-row .bv-pic { width: auto; height: 26px; }
.bv-card { background: #fff; border: 1px solid #ece8df; border-radius: 4px; padding: 4px; display: flex; flex-direction: column; gap: 3px; } .bv-card .bv-pic { height: 18px; }
.bv-soft { background: var(--maroon-wash); } .bv-stat { display: flex; flex-direction: column; align-items: center; gap: 3px; } .bv-stat b { width: 22px; height: 10px; border-radius: 3px; background: var(--maroon); }
.bv-faq { height: 9px; border-radius: 3px; border: 1px solid #e5e1d8; background: #fff; }
.bv-ev { display: flex; gap: 5px; align-items: center; } .bv-ev b { width: 14px; height: 14px; border-radius: 3px; background: var(--maroon-wash); border: 1px solid var(--maroon-line); flex: none; } .bv-ev .bv-ln { flex: 1; }
.bv-face { height: 20px; border-radius: 50%; background: #e5e1d8; max-width: 20px; }
.bv-live { position: absolute; right: 6px; top: 6px; font: 600 9px var(--sans); color: var(--sage-text, var(--sage)); display: inline-flex; align-items: center; gap: 2px; font-style: normal; } .bv-live .jb-ico { width: 9px; height: 9px; }
.bv-quote i { font-style: italic; text-align: center; }
.bv-form .bv-in { height: 8px; border-radius: 3px; border: 1px solid #e5e1d8; background: #fff; } .bv-form .bv-btns span { background: var(--maroon); }
.bv-div { padding: 0; height: 1px; background: #e5e1d8; }

/* pictures */
.bv-strip { margin-bottom: 14px; padding: 10px; border-radius: 12px; background: var(--maroon-wash); animation: bv-in .4s both; }
.bv-thumbs { display: flex; flex-wrap: wrap; gap: 6px; }
.bv-thumbs span { width: 54px; height: 40px; border-radius: 6px; background: #ddd center/cover no-repeat; animation: bv-pop .35s cubic-bezier(.2,.9,.3,1.3) both; box-shadow: 0 2px 6px rgba(0,0,0,.12); }

/* narration + done */
.bv-say { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--ink-2); min-height: 22px; }
.bv-live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--maroon); flex: none; animation: bv-pulse 1.2s infinite; }
.bv-say.ok .bv-live-dot { background: var(--sage); animation: none; }
.bv-say-t.in { animation: bv-in .45s ease both; }
.bv-log { font-size: 13px; color: var(--ink-3); } .bv-log summary { cursor: pointer; } .bv-log ol { margin: 6px 0 0; padding-left: 20px; max-height: 140px; overflow: auto; }
.bv-done { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 14px 16px; border-radius: 12px; background: color-mix(in srgb, var(--sage) 12%, #fff); border: 1px solid color-mix(in srgb, var(--sage) 35%, transparent); animation: bv-pop .5s both; }
.bv-done-t { flex: 1 1 380px; } .bv-done-t b { display: inline-flex; gap: 6px; align-items: center; font-size: 16px; } .bv-done-t p { margin: 6px 0 0; }
.bv-done-b { display: flex; gap: 8px; flex-wrap: wrap; }

@keyframes bv-pop { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes bv-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes bv-build { from { opacity: 0; transform: translateY(-6px) scaleY(.6); transform-origin: top; } to { opacity: 1; transform: none; } }
@keyframes bv-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes bv-sweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes bv-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes bv-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes bv-breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .bv *, .bv *::before, .bv *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }
@media (max-width: 640px) { .jb-sheet.ws-building { height: calc(94vh / var(--zf, 1)); } .bv-steps li { padding: 4px 9px; font-size: 12px; } .bv-stage { padding: 12px; } .bv-tabs { display: none; } }

/* start over */
.ws-startover { margin-top: 10px; border: 0; background: none; padding: 6px 0; font: 600 13px var(--sans); color: var(--ink-3); cursor: pointer; display: inline-flex; gap: 5px; align-items: center; }
.ws-startover:hover { color: #a3271f; } .ws-startover .jb-ico { width: 15px; height: 15px; }
.ws-danger { border-color: #ecc9c5; }
.ws-wipe { background: var(--chip-soft); border-radius: 10px; padding: 10px 14px; } .ws-wipe ul { margin: 4px 0 10px; padding-left: 20px; } .ws-wipe li { margin: 2px 0; }
.jb-btn.danger:not(.ghost) { background: #a3271f; border-color: #a3271f; color: #fff; }
.jb-btn.ghost.danger { color: #a3271f; }
.jb-btn.danger:disabled { opacity: .45; cursor: not-allowed; }
.ws-ai-off { display: flex; align-items: center; gap: 8px; margin: 8px 0 4px; padding: 10px 14px; border-radius: 10px; background: var(--sage-mist); color: var(--ink-2, var(--ink)); font-size: 14px; }
.ws-ai-off .jb-ico { width: 18px; height: 18px; flex: none; }
.ws-code { font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace !important; white-space: pre; tab-size: 2; }

/* ---------------------------------------------------------------- the AI designer (the main way to change the site) */
.ws-app { --ai1: var(--maroon, #7a1f1f); --ai2: color-mix(in srgb, var(--maroon, #7a1f1f) 45%, #6d5dfc); --ai-grad: linear-gradient(135deg, var(--ai1), var(--ai2)); }
@media (min-width: 1181px) { .ws-app .ws-ed { grid-template-columns: 230px minmax(0, 1fr) 400px; } }
.ws-panel:has(> .ai-d) { padding: 0; overflow: hidden; display: flex; flex-direction: column; background: var(--ai-wash); border-color: color-mix(in srgb, var(--ai2) 22%, var(--line)); box-shadow: 0 10px 40px color-mix(in srgb, var(--ai2) 10%, transparent); }
.ai-d { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.ai-h { display: flex; align-items: center; gap: 12px; padding: 14px 14px 12px 16px; border-bottom: 1px solid color-mix(in srgb, var(--ai2) 14%, var(--line)); }
.ai-h > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ai-h b { font-size: 16px; color: var(--ink); }
.ai-h small { color: var(--ink-3); font-size: 13px; }
.ai-av { width: 38px; height: 38px; border-radius: 12px; background: var(--ai-grad); color: #fff; display: grid; place-items: center; flex: none; box-shadow: 0 6px 16px color-mix(in srgb, var(--ai2) 35%, transparent); }
.ai-av .jb-ico { width: 20px; height: 20px; fill: currentColor; }
.ai-x { display: none; }
.ai-log { flex: 1; min-height: 0; overflow: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; scroll-behavior: smooth; }
.ai-m { max-width: 92%; font-size: 14.5px; line-height: 1.55; animation: ai-in .35s cubic-bezier(.2, .8, .3, 1) both; }
.ai-m.me { align-self: flex-end; background: var(--ai-grad); color: #fff; padding: 10px 14px; border-radius: 18px 18px 6px 18px; white-space: pre-wrap; box-shadow: 0 6px 18px color-mix(in srgb, var(--ai2) 22%, transparent); }
.ai-m.bot { align-self: flex-start; display: flex; flex-direction: column; gap: 10px; width: 100%; }
.ai-txt { background: var(--card); border: 1px solid var(--line); padding: 11px 14px; border-radius: 18px 18px 18px 6px; white-space: pre-wrap; color: var(--ink); }
.ai-txt:empty { display: none; }
.ai-m.live .ai-txt:not(:empty)::after { content: ''; display: inline-block; width: 7px; height: 15px; margin-left: 2px; vertical-align: -2px; background: var(--ai2); border-radius: 2px; animation: ai-caret 1s steps(2) infinite; }
.ai-work { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: 14px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); background: linear-gradient(110deg, color-mix(in srgb, var(--ai2) 8%, var(--card)) 30%, color-mix(in srgb, var(--ai2) 18%, var(--card)) 50%, color-mix(in srgb, var(--ai2) 8%, var(--card)) 70%); background-size: 250% 100%; animation: ai-shim 2.2s linear infinite; border: 1px solid color-mix(in srgb, var(--ai2) 20%, var(--line)); }
.ai-spark { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: var(--ai-grad); color: #fff; animation: ai-pulse 1.6s ease-in-out infinite; }
.ai-spark .jb-ico { width: 14px; height: 14px; fill: currentColor; }
.ai-bar { flex-basis: 100%; height: 4px; border-radius: 4px; background: color-mix(in srgb, var(--ai2) 14%, transparent); overflow: hidden; display: block; }
.ai-bar > i { display: block; height: 100%; width: 6%; border-radius: 4px; background: var(--ai-grad); transition: width .6s ease; }
.ai-chg { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 8px 8px 12px; border-radius: 12px; background: color-mix(in srgb, #2e7d32 9%, var(--card)); border: 1px solid color-mix(in srgb, #2e7d32 25%, var(--line)); font-size: 13.5px; font-weight: 600; color: #22622a; }
.ai-chg.new { animation: ai-pop .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.ai-chg span { display: inline-flex; align-items: center; gap: 6px; }
.ai-chg .jb-ico { width: 15px; height: 15px; fill: currentColor; }
.ai-chg button { border: 1px solid currentColor; background: transparent; color: inherit; border-radius: 999px; padding: 4px 12px; font: 600 12.5px var(--sans); cursor: pointer; }
.ai-chg.undone { filter: grayscale(1); opacity: .6; }
.ai-hi { text-align: center; padding: 18px 6px 6px; display: flex; flex-direction: column; align-items: center; gap: 8px; animation: ai-in .5s ease both; }
.ai-orb { width: 64px; height: 64px; border-radius: 22px; background: var(--ai-grad); color: #fff; display: grid; place-items: center; box-shadow: 0 14px 34px color-mix(in srgb, var(--ai2) 35%, transparent); animation: ai-float 4s ease-in-out infinite; margin-bottom: 6px; }
.ai-orb .jb-ico { width: 30px; height: 30px; fill: currentColor; }
.ai-hi h3 { margin: 0; font: 600 21px var(--serif, var(--sans)); color: var(--ink); }
.ai-hi p { margin: 0 0 8px; color: var(--ink-3); font-size: 14px; line-height: 1.5; max-width: 320px; }
.ai-ideas { display: grid; gap: 8px; width: 100%; }
.ai-ideas button { display: flex; align-items: center; gap: 10px; text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: 14px; padding: 10px 12px; font: 500 14px var(--sans); color: var(--ink); cursor: pointer; transition: transform .18s, border-color .18s, box-shadow .18s; }
.ai-ideas button:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--ai2) 45%, var(--line)); box-shadow: 0 8px 20px color-mix(in srgb, var(--ai2) 12%, transparent); }
.ai-ideas .jb-ico { width: 18px; height: 18px; flex: none; color: var(--ai2); fill: currentColor; }
.ai-foot { border-top: 1px solid var(--line); padding: 10px 12px 12px; background: var(--card); display: flex; flex-direction: column; gap: 8px; }
.ai-ctx { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ai-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: var(--page); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; max-width: 100%; }
.ai-chip .jb-ico { width: 13px; height: 13px; }
.ai-chip.sel { color: var(--ai1); border-color: color-mix(in srgb, var(--ai2) 40%, var(--line)); background: color-mix(in srgb, var(--ai2) 8%, var(--card)); }
.ai-chip button { border: 0; background: none; color: inherit; font-size: 15px; line-height: 1; cursor: pointer; padding: 0 0 0 2px; }
.ai-hand { border: 0; background: none; color: var(--ink-3); font: 600 12.5px var(--sans); text-decoration: underline; cursor: pointer; padding: 0 4px; }
.ai-sel-ideas { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.ai-sel-ideas button { flex: none; border: 1px solid color-mix(in srgb, var(--ai2) 30%, var(--line)); background: color-mix(in srgb, var(--ai2) 6%, var(--card)); color: var(--ai1); border-radius: 999px; padding: 6px 12px; font: 600 12.5px var(--sans); cursor: pointer; white-space: nowrap; }
.ai-box { display: flex; align-items: flex-end; gap: 8px; border: 1.5px solid var(--line); border-radius: 18px; padding: 6px 6px 6px 14px; background: #fff; transition: border-color .2s, box-shadow .2s; }
.ai-box:focus-within { border-color: color-mix(in srgb, var(--ai2) 60%, var(--line)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ai2) 12%, transparent); }
.ai-box textarea { flex: 1; border: 0; outline: 0; resize: none; font: 15px/1.45 var(--sans); padding: 7px 0; background: transparent; color: var(--ink); max-height: 180px; }
.ai-tools { display: flex; gap: 4px; align-items: center; }
.ai-ic, .ai-send { width: 38px; height: 38px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; }
.ai-ic { background: transparent; color: var(--ink-3); }
.ai-ic:hover { background: var(--page); color: var(--ink); }
.ai-ic.on { background: #c62828; color: #fff; animation: ai-pulse 1.2s ease-in-out infinite; }
.ai-send { background: var(--ai-grad); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--ai2) 35%, transparent); transition: transform .15s, opacity .2s; }
.ai-send:disabled { opacity: .35; box-shadow: none; cursor: default; }
.ai-send:not(:disabled):hover { transform: scale(1.06); }
.ai-ic .jb-ico, .ai-send .jb-ico { width: 19px; height: 19px; fill: none; }
.ai-note { margin: 0; font-size: 12px; color: var(--ink-3); text-align: center; }
.ai-load { display: flex; gap: 6px; justify-content: center; padding: 30px; }
.ai-load span { width: 8px; height: 8px; border-radius: 50%; background: var(--ai2); animation: ai-pulse 1s ease-in-out infinite; }
.ai-load span:nth-child(2) { animation-delay: .15s; } .ai-load span:nth-child(3) { animation-delay: .3s; }
.ws-back-ai { display: inline-flex; align-items: center; gap: 6px; border: 0; background: color-mix(in srgb, var(--ai2) 8%, var(--card)); color: var(--ai1); font: 600 13px var(--sans); border-radius: 999px; padding: 6px 12px; cursor: pointer; margin-bottom: 10px; }
.ws-back-ai .jb-ico { width: 14px; height: 14px; fill: currentColor; }
.ws-aibtn { border-color: color-mix(in srgb, var(--ai2) 40%, var(--line)) !important; color: var(--ai1) !important; }
/* the preview while the AI works, and when its change lands */
.ws-frame-wrap { position: relative; }
.ws-frame-wrap.ai-busy::after { content: ''; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; background: linear-gradient(110deg, transparent 35%, color-mix(in srgb, var(--ai2) 14%, transparent) 50%, transparent 65%); background-size: 250% 100%; animation: ai-shim 1.8s linear infinite; box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ai2) 40%, transparent); }
.ws-frame-wrap.ai-flash { animation: ai-glow 1.4s ease; }
.ws-fab { display: none; position: absolute; right: 16px; bottom: 16px; z-index: 5; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 12px 18px; background: var(--ai-grad); color: #fff; font: 600 15px var(--sans); cursor: pointer; box-shadow: 0 12px 30px color-mix(in srgb, var(--ai2) 40%, transparent); }
.ws-fab .jb-ico { width: 18px; height: 18px; fill: currentColor; }
@media (max-width: 1180px) { .ws-ed:not(.has-panel) .ws-panel { display: none !important; } .ws-ed:not(.has-panel) .ws-fab { display: inline-flex; } .ai-x { display: inline-flex; } .ws-ed.has-panel .ws-panel:has(> .ai-d) { display: flex; } }
@keyframes ai-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes ai-pop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
@keyframes ai-shim { from { background-position: 100% 0; } to { background-position: -150% 0; } }
@keyframes ai-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.88); opacity: .7; } }
@keyframes ai-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes ai-caret { 50% { opacity: 0; } }
@keyframes ai-glow { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ai2) 60%, transparent); } 100% { box-shadow: 0 0 0 18px transparent; } }
@media (prefers-reduced-motion: reduce) { .ai-m, .ai-hi, .ai-orb, .ai-work, .ai-spark, .ai-chg.new, .ws-frame-wrap.ai-busy::after { animation: none !important; } }

/* the Website page inside the app: a look at the site and the way into the editor */
.ws-ov { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 20px; align-items: start; }
.ws-ov-shot { position: relative; display: block; border-radius: var(--r-lg, 18px); overflow: hidden; border: 1px solid var(--line); background: var(--card); box-shadow: var(--shadow); text-decoration: none; }
.ws-ov-frame { position: relative; width: 100%; aspect-ratio: 16 / 11; overflow: hidden; background: #f3f1ec; }
.ws-ov-frame iframe { position: absolute; top: 0; left: 0; width: 250%; height: 250%; border: 0; transform: scale(.4); transform-origin: 0 0; pointer-events: none; background: #fff; }
.ws-ov-open { position: absolute; left: 50%; bottom: 18px; transform: translate(-50%, 8px); display: inline-flex; align-items: center; gap: 8px; background: var(--ink); color: #fff; font-weight: 600; font-size: 15px; padding: 11px 18px; border-radius: 999px; opacity: 0; transition: opacity .2s, transform .2s; box-shadow: 0 10px 30px rgba(0,0,0,.25); white-space: nowrap; }
.ws-ov-open .jb-ico { width: 18px; height: 18px; }
.ws-ov-shot:hover .ws-ov-open, .ws-ov-shot:focus-visible .ws-ov-open { opacity: 1; transform: translate(-50%, 0); }
.ws-ov-side { display: flex; flex-direction: column; gap: 16px; }
.ws-ov-cta { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.ws-ov-cta .jb-btn { font-size: 16px; padding: 12px 20px; }
.ws-ov-pages { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; }
.ws-ov-pages a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 8px; border-bottom: 1px solid var(--line-soft, var(--line)); text-decoration: none; color: var(--ink); border-radius: 8px; }
.ws-ov-pages li:last-child a { border-bottom: 0; }
.ws-ov-pages a:hover { background: var(--sage-mist); }
.ws-ov-pages span { display: flex; flex-direction: column; min-width: 0; }
.ws-ov-pages small { color: var(--ink-3); font-size: 12.5px; }
.ws-ov-edit { flex-direction: row !important; align-items: center; gap: 2px; color: var(--ink-3); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.ws-ov-edit .jb-ico { width: 16px; height: 16px; }
.ws-ov-pages a:hover .ws-ov-edit { color: var(--sage-ink, var(--ink)); }
.ws-top.ed { grid-template-columns: auto auto minmax(0, 1fr) auto !important; }
.ws-top.ed .ws-name { border-right: 0; }
@media (max-width: 900px) { .ws-ov { grid-template-columns: 1fr; } }
.jb-page-head .ws-actions { flex-wrap: wrap; gap: 8px; }
.jb-tabs + .ws-tab { margin-top: 18px; }
.ws-dom-row { display: flex; align-items: center; gap: 12px 18px; flex-wrap: wrap; padding: 12px 0; border-top: 1px solid var(--line-soft); }
.ws-dom-row .jb-grow { flex: 1 1 220px; min-width: 0; }
.ws-dom-row code { font-size: 14px; }
@media (max-width: 640px) { .ws-dom-row .jb-input { width: 100% !important; } .ws-dom-row form { flex: 1 1 100%; } }
