/* A centered brief moves into a sidebar before the three activity summaries and answer appear. */
#website-story {
  --wbs-surface: #fafafa;
  --wbs-paper: #fff;
  --wbs-line: var(--line, #e3e3df);
  --wbs-ink: var(--ink, #191919);
  --wbs-muted: #63646a;
  --wbs-sidebar: 320px;
  --wbs-ease: cubic-bezier(.22, 1, .36, 1);
  color: var(--wbs-ink);
}
#website-story .wb-heading { max-width: 920px; }
.wbs-stage { position: relative; height: 756px; margin-top: 48px; overflow: hidden; border: 0; border-radius: 20px; background: var(--wbs-surface); box-shadow: 0 12px 40px rgba(0, 0, 0, .08), 0 2px 8px rgba(0, 0, 0, .035); isolation: isolate; transition: background 450ms; }
.wbs-stage.is-split { background: linear-gradient(to right, var(--wbs-paper) 0%, var(--wbs-paper) var(--wbs-sidebar), var(--wbs-surface) var(--wbs-sidebar), var(--wbs-surface) 100%); }
.wbs-stage:not(.is-split) { overflow: visible; background: transparent; box-shadow: none; }
.wbs-chat { position: absolute; z-index: 2; top: calc(50% - var(--wbs-intro-height, 180px) / 2); left: 50%; width: min(620px, calc(100% - 72px)); transform: translateX(-50%); transition: top 500ms var(--wbs-ease), left 500ms var(--wbs-ease), width 500ms var(--wbs-ease), transform 500ms var(--wbs-ease); }
.wbs-chat-head { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; font-size: 16px; font-weight: 600; }
.wbs-chat-head img { width: 27px; height: 27px; object-fit: contain; }
.wbs-user { display: grid; min-height: 96px; padding: 20px 22px; border: 1px solid var(--wbs-line); border-radius: 16px 16px 4px 16px; background: var(--wbs-paper); font-size: 16px; line-height: 1.65; }
.wbs-user-measure, .wbs-user-display { grid-area: 1 / 1; }
.wbs-user-measure { visibility: hidden; }
.wbs-cursor { display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -.1em; background: var(--wbs-ink); animation: wbs-blink 850ms steps(1) infinite; }
.wbs-stage:not(.is-split) :is(.wbs-chat-head, .wbs-thinking, .wbs-answer) { display: none; }
.wbs-stage:not(.is-split) .wbs-user { min-height: 180px; grid-template-rows: 1fr auto; padding: 20px 18px 12px; border: 0; border-radius: 18px; row-gap: 8px; box-shadow: 0 12px 40px rgba(0, 0, 0, .08), 0 2px 8px rgba(0, 0, 0, .035); }
.wbs-intro-actions { grid-area: 2 / 1; }
.wbs-stage.is-split .wbs-intro-actions { display: none; }
.wbs-thinking { display: grid; gap: 13px; margin: 27px 0 0; padding: 0; list-style: none; }
.wbs-thought { position: relative; display: flex; align-items: center; gap: 11px; min-height: 28px; color: var(--wbs-muted); font-size: 14px; line-height: 1.55; opacity: 0; visibility: hidden; transform: translateY(5px); transition: opacity 220ms, transform 300ms var(--wbs-ease); }
.wbs-thought:not(:last-child)::after { content: ''; position: absolute; left: 9px; top: calc(50% + 14px); width: 1px; height: 13px; background: var(--wbs-line); }
.wbs-thought svg { flex: none; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.wbs-thought[data-state="done"] { opacity: 1; visibility: visible; transform: none; }
.wbs-answer { display: grid; margin-top: 25px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity 250ms, transform 450ms var(--wbs-ease); }
.wbs-stage:is([data-step="answer"], [data-step="result"]) .wbs-answer { opacity: 1; visibility: visible; transform: none; }
.wbs-answer p { grid-area: 1 / 1; margin: 0; color: var(--wbs-muted); font-size: 14px; line-height: 1.75; white-space: pre-line; }
.wbs-answer-measure { visibility: hidden; }
.wbs-stage.is-split .wbs-chat { top: 28px; left: 24px; width: calc(var(--wbs-sidebar) - 48px); transform: none; }
.wbs-stage.is-split .wbs-user { min-height: 0; padding: 12px 14px; border-color: transparent; border-radius: 16px; background: #f5f5f4; font-size: 14px; }
.wbs-stage.is-split .wbs-chat-head { margin-bottom: 23px; }
/* Display-only composer, anchored beneath the narrative inside the sidebar. */
.wbs-composer { position: absolute; z-index: 3; left: 16px; bottom: 16px; display: flex; flex-direction: column; width: calc(var(--wbs-sidebar) - 32px); height: 132px; padding: 16px 18px 12px; border: 1px solid var(--wbs-line); border-radius: 18px; background: var(--wbs-paper); opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity 300ms ease 200ms, transform 400ms var(--wbs-ease) 200ms, visibility 0s 200ms; }
.wbs-stage.is-split .wbs-composer { opacity: 1; visibility: visible; transform: none; }
#website-story .wbs-composer-input { display: block; flex: 1; width: 100%; min-height: 0; margin: 0; padding: 0 3px; resize: none; overflow: hidden; border: 0; border-radius: 0; outline: none; background: transparent; color: var(--wbs-ink); font: inherit; font-size: 14px; line-height: 1.5; box-shadow: none; }
#website-story .wbs-composer-input::placeholder { color: var(--wbs-muted); opacity: .7; }
.wbs-composer-actions { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 12px; min-height: 30px; margin: 8px -8px 0 -2px; }
.wbs-composer-controls { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
#website-story .wbs-composer-actions button { display: grid; place-items: center; flex: none; width: 20px; height: 26px; min-width: 0; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--wbs-muted); font: inherit; opacity: 1; cursor: default; box-shadow: none; }
#website-story .wbs-composer-actions .wbs-composer-model { display: inline-flex; align-items: center; justify-content: center; gap: 2px; width: auto; min-width: 52px; height: 24px; padding: 0 6px 0 8px; border: 1px solid var(--wbs-line); background: var(--wbs-paper); font-size: 11px; font-weight: 400; letter-spacing: -.01em; white-space: nowrap; }
#website-story .wbs-composer-actions .wbs-composer-send { width: 30px; height: 30px; border-radius: 9px; background: #EA580D; color: var(--wbs-paper); }
.wbs-composer-actions svg { display: block; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.wbs-composer-model svg { width: 12px; height: 12px; }
.wbs-composer-send svg { width: 16px; height: 16px; stroke-width: 1.9; }
/* The centered opening composer has larger controls than the compact sidebar. */
.wbs-intro-actions { min-height: 38px; }
.wbs-intro-actions .wbs-composer-controls { gap: 7px; }
#website-story .wbs-intro-actions button { width: 28px; height: 32px; }
#website-story .wbs-intro-actions .wbs-composer-model { gap: 3px; width: auto; min-width: 62px; height: 30px; padding: 0 8px 0 10px; font-size: 13px; }
#website-story .wbs-intro-actions .wbs-composer-send { width: 34px; height: 34px; align-self: flex-end; }
.wbs-intro-actions svg { width: 20px; height: 20px; }
.wbs-intro-actions .wbs-composer-model svg { width: 14px; height: 14px; }
.wbs-intro-actions .wbs-composer-send svg { width: 19px; height: 19px; }
.wbs-preview { position: absolute; z-index: 1; inset: 0 0 0 var(--wbs-sidebar); overflow: hidden; border-left: 1px solid var(--wbs-line); background: var(--wbs-surface); opacity: 0; transform: translateX(22px); transition: opacity 550ms ease, transform 700ms var(--wbs-ease); pointer-events: none; user-select: none; }
.wbs-stage[data-step="result"] .wbs-preview { opacity: 1; transform: none; }
.wbs-viewport { position: absolute; inset: 0; overflow: clip; background: var(--wbs-surface); pointer-events: none; }
.wbs-site-image { display: block; width: 100%; height: auto; max-width: none; transform: translate3d(0, 0, 0); will-change: transform; pointer-events: none; user-select: none; -webkit-user-drag: none; }
.wbs-stage[data-image-error="true"] .wbs-viewport::after { content: ''; position: absolute; inset: 32px; border: 1px dashed var(--wbs-line); border-radius: 8px; background: linear-gradient(135deg, #f0f0ec, #fafaf8); }
.wbs-cursor[hidden] { display: none; }
.wbs-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@keyframes wbs-blink { 0%, 48% { opacity: 1; } 49%, 100% { opacity: 0; } }
@media (min-width: 821px) {
  .wbs-stage.is-split .wbs-user { margin-left: 10px; margin-right: -8px; }
}
@media (max-width: 1050px) and (min-width: 821px) {
  .wbs-stage { height: 756px; }.wbs-stage.is-split .wbs-chat { left: 20px; width: calc(var(--wbs-sidebar) - 40px); }
  .wbs-stage.is-split .wbs-user { margin-left: 14px; margin-right: -4px; }
  .wbs-stage.is-split .wbs-user { font-size: 13px; }.wbs-answer p, .wbs-thought { font-size: 13px; }
}
@media (max-width: 820px) {
  #website-story { --wbs-preview-height: clamp(200px, 58vw, 360px); padding-bottom: 60px; }
  .wbs-stage { height: clamp(360px, 60svh, 500px); margin-top: 28px; border-radius: 14px; }
  .wbs-stage.is-split { display: flex; flex-direction: column; height: auto; padding: 20px 16px 16px; background: var(--wbs-paper); }
  .wbs-chat { width: calc(100% - 32px); }
  .wbs-user { min-height: 110px; padding: 18px; font-size: 15px; overflow-wrap: anywhere; }
  .wbs-stage.is-split .wbs-chat { position: relative; top: auto; left: auto; width: 100%; transform: none; transition: none; }
  .wbs-stage.is-split .wbs-chat-head { gap: 8px; margin-bottom: 16px; font-size: 15px; }
  .wbs-chat-head img { width: 24px; height: 24px; }
  .wbs-stage.is-split .wbs-user { margin: 0; font-size: 14px; }
  .wbs-thinking { position: relative; display: block; height: 28px; margin: 20px 0 0; overflow: hidden; }
  .wbs-thought { position: absolute; inset: 0; gap: 9px; min-height: 28px; font-size: 13px; }
  .wbs-thought[data-current="false"] { opacity: 0; visibility: hidden; transform: translateY(-4px); }
  .wbs-thought[data-current="true"] { opacity: 1; visibility: visible; transform: none; }
  .wbs-thought svg { width: 18px; height: 18px; }
  .wbs-thought span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .wbs-thought::after { display: none; }
  .wbs-answer { margin-top: 20px; }
  .wbs-answer p { font-size: 14px; line-height: 1.65; overflow-wrap: anywhere; }
  .wbs-composer { display: none; }
  .wbs-preview { inset: auto 16px 16px; height: var(--wbs-preview-height); border: 1px solid var(--wbs-line); border-radius: 8px; transform: translateY(12px); }
  .wbs-stage.is-split .wbs-preview { position: relative; inset: auto; flex: none; width: 100%; margin-top: 20px; }
}
@media (max-width: 420px) {
  .wbs-intro-actions { min-height: 34px; }
  .wbs-intro-actions .wbs-composer-controls { gap: 5px; }
  #website-story .wbs-intro-actions button { width: 24px; height: 30px; }
  #website-story .wbs-intro-actions .wbs-composer-model { gap: 2px; min-width: 56px; height: 28px; padding: 0 6px 0 8px; font-size: 12px; }
  #website-story .wbs-intro-actions .wbs-composer-send { width: 34px; height: 34px; }
  .wbs-intro-actions svg { width: 18px; height: 18px; }
  .wbs-intro-actions .wbs-composer-model svg { width: 12px; height: 12px; }
  .wbs-intro-actions .wbs-composer-send svg { width: 18px; height: 18px; }
}
@media (max-width: 360px) {
  .wbs-intro-actions { gap: 8px; }
  .wbs-intro-actions .wbs-composer-controls { gap: 3px; }
  #website-story .wbs-intro-actions button { width: 20px; height: 28px; }
  #website-story .wbs-intro-actions .wbs-composer-model { min-width: 52px; height: 28px; padding: 0 4px 0 6px; font-size: 11px; }
  .wbs-intro-actions svg { width: 16px; height: 16px; }
  .wbs-intro-actions .wbs-composer-model svg { width: 10px; height: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  #website-story *, #website-story *::before, #website-story *::after { animation: none !important; transition: none !important; }
}
