/* ───────── Modes — a guided product demo ─────────
   Calm (no JS / reduced motion): the head, then per mode a chapter header and
   its steps, each a still window in its end state with the story beside it. Pinned: one app window beside its story; modes.js plays
   a cursor clip per mode (typing, clicks, mode switch) and ticks the story's steps. Window, bodies and veil share one box (--bl/--bt/--bs,
   design size --dw × --dh) that modes.js fits to the stage. */
.modes { position: relative; padding: 168px var(--pad-x) 120px; border-top: 1px solid var(--border-subtle); }
.modes .sec-head { max-width: 1040px; margin-bottom: 72px; }
.mrail, .win, .win__veil, .cursor, .story, .carrier { display: none; }
.modes .wb--live { display: none; }
.modes__calm, .chap__steps { list-style: none; margin: 0; padding: 0; }
.chap + .chap { margin-top: 120px; }
.chap__h { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; font-size: 15px; letter-spacing: 0; }
.chap__label { font-size: 16px; font-weight: 400; color: var(--text-2); }
.step { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: center; padding: 40px 0; border-top: 1px solid var(--border-subtle); }
.step__say h4 { font-size: clamp(28px, 2.8vw, 40px); font-weight: 600; letter-spacing: -.04em; line-height: 1.04; }
.modes__anchor { position: absolute; left: 0; top: calc(300px + (100% - 300px) * var(--c) / 3); width: 1px; height: 1px; pointer-events: none; visibility: hidden; }

/* The window — static (calm) */
.wb { position: relative; display: flex; flex-direction: column; width: 100%; max-width: 640px; height: 610px; margin-left: auto; overflow: hidden; border: 1px solid var(--border-default); border-radius: 16px; background: var(--canvas-simple); box-shadow: var(--float-shadow); color: var(--text-1); line-height: 1.45; user-select: none; }
.wb[data-mode="developer"] { background: var(--code-bg); }
.wb__bar, .win__bar { flex: none; display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 14px 0 16px; border-bottom: 1px solid var(--border-subtle); background: var(--bg-nav); }
.wb[data-mode="developer"] .wb__bar { background: var(--bg-base); }
.wb__bar > i, .win__bar > i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--border-default); }
.win__title { margin-left: 8px; font-size: 13px; font-weight: 500; color: var(--text-3); }
.win__nav, .wb__bar .modes__seg { margin-left: auto; }
.modes__seg { --n: 3; }
.modes__seg > *:not(.seg__pill) { height: 32px; padding: 0 14px; gap: 7px; font-size: 13px; font-weight: 500; }
.modes__seg > *:not(.seg__pill) > span { pointer-events: none; }
.modes__seg > button[aria-current="true"], .modes__seg > span.is-on { color: var(--text-1); font-weight: 600; }
.modes__seg .ic { width: 16px; height: 16px; }
.wb__bar .modes__seg > *:not(.seg__pill) { height: 28px; padding: 0 11px; font-size: 12.5px; }

.slot { position: relative; display: grid; }
.slot > * { grid-area: 1 / 1; }
.slot > .card { width: 100%; }
.card { border-radius: 16px; box-shadow: none; }
.busy__head { display: flex; align-items: center; gap: 10px; }
.busy__mark { width: 18px; height: 18px; }
.busy { display: flex; flex-direction: column; gap: 18px; padding: 20px 22px; }
.busy__txt { font-size: 14px; font-weight: 500; background: linear-gradient(90deg, var(--text-3) 30%, var(--text-1) 50%, var(--text-3) 70%) 0 0 / 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 1.6s linear infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.busy__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.busy__steps li { position: relative; padding-left: 28px; font-size: 14px; color: var(--text-4); transition: color 250ms var(--e-out); }
.busy__steps li::before { content: ""; position: absolute; left: 4px; top: 50%; width: 10px; height: 10px; margin-top: -5px; border-radius: 50%; border: 1.5px solid var(--border-default); box-sizing: border-box; }
.busy__steps li[data-s="run"] { color: var(--text-1); }
.busy__steps li[data-s="run"]::before { border: 0; background: var(--text-1); animation: breathe 1.2s ease-in-out infinite; }
.busy__steps li[data-s="done"] { color: var(--text-2); }
.busy__steps li[data-s="done"]::before { left: 5px; width: 10px; height: 5px; margin-top: -4px; border-radius: 0; border: solid var(--ok); border-width: 0 0 1.5px 1.5px; transform: rotate(-45deg); }
.busy__skel { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; min-height: 40px; padding-top: 18px; border-top: 1px solid var(--border-subtle); }
.busy__skel i { height: 10px; border-radius: 5px; background: var(--bg-active); }
.busy__skel i:nth-child(2) { width: 84%; }
.busy__skel i:nth-child(3) { width: 58%; }
.home__mark { width: 56px; height: 56px; margin-bottom: 18px; }
.home__h { font-size: 36px; font-weight: 300; letter-spacing: -.04em; line-height: 1.05; }
.home__p { margin-top: 8px; font-size: 18px; font-weight: 300; color: var(--text-2); }

/* Simple body: three panes above a composer */
.wb--simple { position: relative; }
.sm { flex: 1; min-height: 0; display: flex; }
.sm__side { flex: none; width: 210px; display: flex; flex-direction: column; gap: 2px; padding: 14px 10px; border-right: 1px solid var(--border-subtle); overflow: hidden; }
.sm__nav, .sm__chat { display: flex; align-items: center; gap: 10px; min-height: 34px; padding: 0 10px; border-radius: 9px; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm__nav { font-weight: 500; }
.sm__nav .ic { width: 16px; height: 16px; color: var(--text-2); }
.sm__nav--sub { color: var(--text-2); font-weight: 400; }
.sm__group { margin: 14px 10px 4px; font-size: 12px; font-weight: 500; color: var(--text-3); }
.sm__chat { display: block; line-height: 34px; color: var(--text-2); }
.sm__chat.is-on { background: var(--bg-active); color: var(--text-1); font-weight: 500; }
.sm__chat--new { min-height: 0; max-height: 0; opacity: 0; transition: max-height 420ms var(--e-io), opacity 360ms var(--e-out) 120ms; }
[data-pane="s1"] .sm__chat--new { max-height: 34px; opacity: 1; }
.sm__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sp { flex: 1; min-height: 0; position: relative; }
.sp > * { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 320ms var(--e-out), visibility 0s linear 320ms; }
.sp__hello { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.sp__s1 { display: flex; flex-direction: column; justify-content: flex-end; padding: 0 32px 8px; }
[data-pane="hello"] .sp__hello, [data-pane="s1"] .sp__s1 { opacity: 1; visibility: visible; transition: opacity 360ms var(--e-out) 100ms, visibility 0s; }
.wb--simple .thread { width: min(100%, 620px); margin: 0 auto; display: flex; flex-direction: column; gap: 14px; }
.slot > * { opacity: 0; translate: 0 14px; visibility: hidden; transition: opacity 300ms var(--e-out), translate 420ms var(--e-out), visibility 0s linear 300ms; }
[data-a="work"] .sp__s1 .busy, [data-a="draft"] .sp__s1 .mail, [data-a="sent"] .sp__s1 .mail { opacity: 1; translate: 0 0; visibility: visible; transition: opacity 360ms var(--e-out) 80ms, translate 460ms var(--e-out) 80ms, visibility 0s; }
.res__state { display: grid; justify-items: end; }
.res__state > * { grid-area: 1 / 1; transition: opacity 300ms var(--e-out); }
.res__s1 { opacity: 0; }
[data-a="sent"] .res__s0 { opacity: 0; }
[data-a="sent"] .res__s1 { opacity: 1; }
.res__end { display: grid; }
.res__end > * { grid-area: 1 / 1; margin: 0; transition: opacity 300ms var(--e-out), translate 360ms var(--e-out); }
.res__done { justify-self: start; display: flex; align-items: center; gap: 10px; height: 28px; font-size: 14px; font-weight: 600; opacity: 0; translate: 0 6px; }
[data-a="sent"] .res__actions { opacity: 0; translate: 0 -6px; }
[data-a="sent"] .res__done { opacity: 1; translate: 0 0; }
.msg__done { justify-self: start; }
.sentrow__ic { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ok); color: #fff; }
.sentrow__ic .ic { width: 13px; height: 13px; }
.ask { align-self: flex-end; max-width: 84%; padding: 10px 16px; border-radius: 18px 18px 6px 18px; background: var(--bubble); font-size: 15px; line-height: 1.45; }
.composer { flex: none; display: flex; align-items: center; gap: 10px; width: min(100% - 64px, 620px); min-height: 58px; margin: 12px auto 22px; padding: 8px 8px 8px 12px; border-radius: 22px; background: var(--composer); border: 1px solid var(--composer-edge); box-shadow: var(--shadow-subtle); font-size: 15px; line-height: 1.4; transition: border-color 250ms var(--e-out); }
.composer__field { position: relative; flex: 1; min-width: 0; min-height: 1.4em; padding-left: 4px; }
.composer__caret { display: none; width: 1.5px; height: 1.2em; margin-left: 1px; vertical-align: -.25em; background: var(--text-1); }
.composer__hint { position: absolute; left: 4px; top: 0; white-space: nowrap; color: var(--text-3); pointer-events: none; transition: opacity 150ms var(--e-out); }
.composer.is-typing .composer__hint { opacity: 0; }
.composer__send { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--bg-active); color: var(--text-3); transition: background-color 200ms var(--e-out), color 200ms var(--e-out), scale 160ms var(--e-out); }
.composer.is-typing .composer__send { background: var(--accent); color: var(--on-accent); }
.composer.is-focus { border-color: var(--border-strong); }
.is-hov.btn--primary, .is-hov.btn--secondary { filter: brightness(.94); box-shadow: 0 0 0 3px color-mix(in srgb, var(--text-1) 14%, transparent); }
.is-pressed { scale: .94; filter: brightness(.86); }

.res__meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; font-size: 12px; color: var(--text-2); }
.res__tag { display: inline-flex; align-items: center; gap: 8px; height: 26px; padding: 0 10px 0 6px; border-radius: var(--r-pill); background: var(--bg-active); color: var(--text-1); font-weight: 500; white-space: nowrap; }
.res__actions { display: flex; gap: 6px; }
.mail { padding: 18px 22px; }
.mail__head { margin: 0; border-top: 1px solid var(--border-subtle); }
.mail__head div { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border-subtle); font-size: 14px; }
.mail__head dt { width: 64px; color: var(--text-2); }
.mail__head dd { margin: 0; font-weight: 500; }
.mail__body { display: grid; gap: 8px; padding: 14px 0 16px; font-size: 14px; line-height: 1.55; }

.dwin__side { flex: none; width: 11.5em; padding: .8em .6em; border-right: 1px solid var(--border-subtle); background: var(--bg-base); }
.dwin__tree { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.dwin__tree li { display: flex; align-items: center; gap: .55em; height: 2.15em; padding: 0 .65em; border-radius: var(--r-ctl); color: var(--text-2); white-space: nowrap; }
.dwin__tree li > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dwin__tree .is-on { background: var(--bg-active); color: var(--text-1); }
.dwin__proj { margin-bottom: .35em; color: var(--text-1) !important; font-weight: 600; }
.dwin__m { font-style: normal; font-size: .85em; font-weight: 600; color: var(--warn-fg); }
.dwin__main { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.dwin__term { flex: none; padding: .75em 1.1em; border-top: 1px solid var(--border-subtle); background: var(--bg-base); font: 1em/1.6 var(--mono); color: var(--text-2); }
.dwin__term p { margin: 0; white-space: nowrap; }
.dwin__ps { margin-right: .6em; color: var(--text-4); }
.dwin__ok { color: var(--ok-fg); }
.dwin__caret { display: inline-block; width: .5em; height: 1.05em; vertical-align: -.2em; background: var(--text-2); }
.dbtn { display: inline-flex; align-items: center; height: 2.2em; padding: 0 1.1em; border-radius: var(--r-ctl); border: 1px solid var(--border-default); background: var(--bg-surface); font-weight: 500; }
.dbtn--primary { background: var(--accent); border-color: transparent; color: var(--on-accent); }
.dchip { display: inline-flex; align-items: center; gap: .55em; height: 2.15em; padding: 0 .9em; border-radius: var(--r-pill); border: 1px solid var(--border-default); background: var(--bg-surface); white-space: nowrap; }
.dchip .ic { color: var(--text-2); }
.dchip i { font-style: normal; color: var(--text-4); }
.dchip b { display: inline-flex; align-items: center; gap: .35em; font-weight: 600; }
.plan { max-width: 36em; padding: 1.1em 1.2em; border-radius: var(--r-dev); border: 1px solid var(--border-default); background: var(--bg-surface); }
.plan__h { display: flex; align-items: center; gap: .55em; margin: 0 0 1em; font-size: 1.1em; }
.plan__h .ic { color: var(--text-2); }
.plan__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .5em; }
.plan__steps li { display: flex; align-items: center; gap: .8em; padding: .7em .8em; border-radius: var(--r-ctl); background: var(--bg-base); border: 1px solid var(--border-subtle); }
.plan__steps i { flex: none; display: grid; place-items: center; width: 1.7em; height: 1.7em; border-radius: 50%; background: var(--bg-active); font-style: normal; font-size: .85em; font-weight: 600; color: var(--text-2); }
.plan__acts { display: flex; gap: .55em; margin-top: 1.1em; }
.plan__wait { display: flex; align-items: center; gap: .6em; margin: 1em 0 0; font-size: .92em; color: var(--text-3); }
.editor { display: flex; flex-direction: column; min-width: 0; min-height: 0; border: 1px solid var(--border-default); border-radius: var(--r-dev); overflow: hidden; background: var(--code-bg); }
.editor__tabs { flex: none; display: flex; margin: 0; border-bottom: 1px solid var(--border-subtle); background: var(--bg-base); }
.editor__tabs span { display: inline-flex; align-items: center; gap: .55em; height: 2.7em; padding: 0 1.1em; color: var(--text-3); border-right: 1px solid var(--border-subtle); }
.editor__tabs .is-on { color: var(--text-1); background: var(--code-bg); box-shadow: inset 0 -2px 0 var(--text-1); }
.editor__code { flex: 1; min-height: 0; padding: .8em 0; font: .96em/1.85 var(--mono); overflow: hidden; }
.editor__code code { display: block; padding-right: 1em; font: inherit; white-space: pre; color: var(--text-1); }
.editor__code code > span { display: inline-block; width: 3.4em; padding-right: 1.3em; text-align: right; color: var(--text-4); }
.editor__code em { font-style: normal; }
.editor__code .k { color: #C08AF0; } .editor__code .f { color: #7FB4FF; } .editor__code .s { color: #8FD19E; } .editor__code .n { color: #E8B672; }
.editor__code .is-add { background: color-mix(in srgb, var(--ok) 14%, transparent); box-shadow: inset 3px 0 0 var(--ok); }
.editor__chip { flex: none; margin: 0; padding: .7em 1.1em; border-top: 1px solid var(--border-subtle); background: var(--bg-base); }
.check { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.1em; align-items: start; }
.browser { overflow: hidden; border-radius: var(--r-dev); border: 1px solid var(--border-default); background: var(--bg-base); }
.browser__bar { display: flex; align-items: center; gap: .45em; height: 2.5em; margin: 0; padding: 0 .9em; border-bottom: 1px solid var(--border-subtle); background: var(--bg-nav); }
.browser__bar i { width: .65em; height: .65em; border-radius: 50%; background: var(--border-default); }
.browser__bar span { flex: 1; margin: 0 2.4em 0 .6em; padding: .2em .8em; border-radius: var(--r-pill); background: var(--bg-input); text-align: center; font-size: .9em; color: var(--text-3); }
.browser__page { display: grid; gap: .6em; padding: 1.1em 1.3em 1.3em; }
.browser__brand { font-size: .9em; font-weight: 600; color: var(--text-3); }
.browser__h { margin-bottom: .3em; font-size: 1.45em; font-weight: 600; letter-spacing: -.03em; line-height: 1.1; }
.browser__field { display: flex; justify-content: space-between; align-items: center; padding: .55em .8em; border-radius: var(--r-ctl); border: 1px solid var(--border-default); background: var(--bg-input); }
.browser__field small { font-size: .85em; color: var(--text-3); }
.browser__cta { justify-self: start; display: inline-flex; align-items: center; height: 2.4em; padding: 0 1.4em; border-radius: var(--r-pill); background: var(--accent); color: var(--on-accent); font-weight: 500; }
.team__rows { list-style: none; margin: 0; padding: 0; display: grid; gap: .55em; }
.team__rows li { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: .75em; row-gap: .1em; align-items: center; padding: .8em .9em; border-radius: var(--r-dev); border: 1px solid var(--border-default); background: var(--bg-surface); }
.team__rows .ic { display: none; }
.team__rows b { font-weight: 500; line-height: 1.3; }
.team__rows em { grid-column: 2; font-style: normal; font-size: .9em; color: var(--text-2); }
.team__rows .led { grid-row: span 2; width: .6em; height: .6em; }

.bots__rail { display: flex; flex-direction: column; gap: 4px; padding: 16px 12px; border-right: 1px solid var(--border-subtle); }
.bots__rail-h { margin: 0; padding: 0 10px 8px; font-size: 13px; font-weight: 600; }
.bots__c { display: flex; align-items: center; gap: 11px; min-height: 56px; padding: 0 10px; border-radius: 12px; }
.bots__c.is-on { background: var(--bg-active); }
.bots__c .av { width: 36px; height: 36px; font-size: 13px; }
.bots__who { flex: 1; min-width: 0; display: grid; line-height: 1.3; }
.bots__who b { font-size: 14.5px; font-weight: 600; }
.bots__who span { font-size: 12.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bots__c .led { width: 8px; height: 8px; }
.bots__new { display: flex; align-items: center; gap: 11px; margin: 8px 0 0; min-height: 46px; padding: 0 10px; border-top: 1px solid var(--border-subtle); font-size: 13.5px; font-weight: 500; }
.bots__new i { flex: none; display: grid; place-items: center; width: 36px; height: 36px; font-style: normal; border-radius: 50%; border: 1px dashed var(--border-strong); color: var(--text-2); }
.bot { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.bot__head { display: flex; align-items: center; gap: 14px; padding: 14px 22px; border-bottom: 1px solid var(--border-subtle); }
.bot__head > div { flex: 1; min-width: 0; line-height: 1.3; }
.bot__head h5 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.015em; }
.bot__head p { margin: 0; font-size: 13px; color: var(--text-2); }
.bot__head .av { width: 42px; height: 42px; font-size: 14px; }
.bot__facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1.3fr 1fr 1fr; border-bottom: 1px solid var(--border-subtle); background: var(--bg-nav); }
.bot__facts li { display: flex; align-items: flex-start; gap: 9px; padding: 12px 14px; font-size: 12px; line-height: 1.4; color: var(--text-2); }
.bot__facts li + li { border-left: 1px solid var(--border-subtle); }
.bot__facts .ic { margin-top: 1px; color: var(--text-1); }
.bot__facts .nb { white-space: nowrap; }
.bot__chat { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: flex-end; gap: 14px; padding: 22px 22px 26px; }
.bot__chat .ask { max-width: 70%; }
.msg { display: flex; align-items: flex-end; gap: 10px; max-width: 84%; }
.msg .av { margin-bottom: 2px; }
.msg__b { min-width: 0; padding: 11px 15px; border-radius: 18px 18px 18px 6px; background: var(--bg-surface); border: 1px solid var(--border-default); font-size: 14px; line-height: 1.5; }
.msg__b p { margin: 0; }
.msg__b--team { background: var(--bg-elevated); }
.msg__from { display: block; margin-bottom: 2px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.msg__tag { display: inline-flex; align-items: center; gap: 6px; height: 22px; margin-bottom: 8px !important; padding: 0 9px; border-radius: var(--r-pill); background: var(--bg-active); font-size: 12px; font-weight: 500; color: var(--text-2); }
.msg__acts { display: flex; gap: 8px; margin-top: 11px !important; }
.snaps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 11px !important; }
.snap { display: block; aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--border-subtle); }
.snap--a { background: radial-gradient(circle at 68% 30%, #F2C56B 0 14%, transparent 15%), linear-gradient(to top, #6C4E8E 0 34%, #3A2C55 34%); }
.snap--b { background: radial-gradient(ellipse at 22% 108%, #E9A24B 0 46%, transparent 47%), radial-gradient(ellipse at 88% 118%, #C283E0 0 42%, transparent 43%), #2E2A44; }
.snap--c { background: radial-gradient(circle at 50% 42%, #EDE3F7 0 17%, transparent 18%), radial-gradient(ellipse at 50% 116%, #C283E0 0 44%, transparent 45%), #3A2C55; }

/* ── Developer: the denser window ── */
.wb--dev { font-size: 13.5px; }
.wb--dev .dwin__body { flex: 1; min-height: 0; display: flex; }
.dm { position: relative; flex: 1; min-height: 0; padding: 1.1em 1.2em; }
.dm > * { position: absolute; inset: 1.1em 1.2em; opacity: 0; visibility: hidden; transition: opacity 320ms var(--e-out), visibility 0s linear 320ms; }
[data-dv="empty"] .dm__empty, [data-dv="plan"] .dm__plan, [data-dv="build"] .dm__build { opacity: 1; visibility: visible; transition: opacity 360ms var(--e-out) 100ms, visibility 0s; }
.dm__empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3em; color: var(--text-3); text-align: center; }
.dm__empty .ic { width: 1.8em; height: 1.8em; margin-bottom: .5em; color: var(--text-2); }
.dm__empty b { font-size: 1.2em; font-weight: 500; color: var(--text-1); }
.dm__build { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.1em; }
.dm__side { display: flex; flex-direction: column; gap: .8em; min-width: 0; }
.dm__side .browser__page { padding: .8em 1em 1em; gap: .45em; }
.dm__side .browser__h { font-size: 1.2em; }
.dm__side .browser__field { padding: .4em .7em; }
.dm__side .browser__cta { height: 2.1em; }
.dm__build .editor__code { padding: .6em 0; font-size: .9em; }
.dcomposer { flex: none; display: flex; align-items: center; gap: .7em; margin: 0 1.2em 1.1em; min-height: 3.2em; padding: .5em .5em .5em 1.1em; border-radius: var(--r-dev-input); background: var(--bg-surface); border: 1px solid var(--border-default); }
.dcomposer.is-focus { border-color: var(--border-strong); }
.dc__field { position: relative; flex: 1; min-width: 0; min-height: 1.4em; }
.dc__hint { position: absolute; left: 0; top: 0; white-space: nowrap; color: var(--text-4); }
.dcomposer.is-typing .dc__hint { opacity: 0; }
.dc__send { display: grid; place-items: center; width: 2.3em; height: 2.3em; border-radius: var(--r-ctl); background: var(--bg-active); color: var(--text-3); transition: background-color 200ms var(--e-out), color 200ms var(--e-out); }
.dcomposer.is-typing .dc__send { background: var(--accent); color: var(--on-accent); }
.dwin__term { display: grid; }
.dwin__term > p { grid-area: 1 / 1; }
.dwin__term .t2 { grid-area: 2 / 1; }
.dwin__term .t0 { opacity: calc(1 - var(--tm, 0) * 20); }
.dwin__term .t1 { opacity: clamp(0, calc(var(--tm, 0) * 20), 1); }
.dwin__term .t2 { opacity: clamp(0, calc((var(--tm, 0) - .5) * 8), 1); }
.dm__plan .plan__steps li { --v: clamp(0, calc((var(--pl, 0) - var(--k, 0) * .16) / .3), 1); opacity: var(--v); translate: 0 calc((1 - var(--v)) * 6px); }
.dm__plan :is(.plan__acts, .plan__wait) { opacity: clamp(0, calc((var(--pl, 0) - .55) / .3), 1); }
.dm__build .editor__code .is-add { --v: clamp(0, calc((var(--ed, 0) - var(--k, 0) * .17) / .2), 1); opacity: var(--v); translate: 0 calc((1 - var(--v)) * 6px); }
.dm__build .editor__chip .dchip { opacity: clamp(0, calc((var(--ch, 0) - .1) / .6), 1); }
.dm__build .browser { opacity: var(--br, 0); translate: calc((1 - var(--br, 0)) * 3em) 0; }
.dm__build .team__rows li { --v: clamp(0, calc((var(--br, 0) - .4 - var(--k, 0) * .2) / .3), 1); opacity: var(--v); translate: 0 calc((1 - var(--v)) * 6px); }
.dbtn.is-hov { filter: brightness(.94); box-shadow: 0 0 0 3px color-mix(in srgb, var(--text-1) 14%, transparent); }
.dchip.is-hov { background: var(--bg-active); }

/* ── SenBot: the messenger ── */
.wb--bots { display: grid; grid-template-columns: 240px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
.wb--bots .wb__bar { grid-column: 1 / -1; }
.bpanes { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.bpanes > .bot { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity 320ms var(--e-out), visibility 0s linear 320ms; }
.bpanes::after { content: ""; position: absolute; inset: 0; z-index: 2; background: color-mix(in srgb, var(--bg-base) 62%, transparent); opacity: 0; pointer-events: none; transition: opacity 260ms var(--e-out); }
[data-bs="create"] .bpanes::after { opacity: 1; }
[data-sel="max"] .bot--max, [data-sel="ivy"] .bot--ivy { opacity: 1; visibility: visible; transition: opacity 360ms var(--e-out) 100ms, visibility 0s; }
.bots__c--ivy { overflow: hidden; max-height: 0; min-height: 0; opacity: 0; padding-top: 0; padding-bottom: 0; transition: max-height 500ms var(--e-io), opacity 400ms var(--e-out) 120ms; }
[data-bs="ivy"] .bots__c--ivy, [data-bs="msg"] .bots__c--ivy, [data-bs="sent"] .bots__c--ivy { max-height: 60px; min-height: 56px; opacity: 1; }
[data-sel="max"] .bots__c--max, [data-sel="ivy"] .bots__c--ivy { background: var(--bg-active); }
.bots__c { position: relative; transition: background-color 200ms var(--e-out); }
.bots__c.is-hov { background: var(--bg-hover); }
.bots__new { transition: background-color 200ms var(--e-out); border-radius: 12px; }
.bots__new.is-hov { background: var(--bg-hover); }
.bots__badge { display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--accent); color: var(--on-accent); font-size: 11.5px; font-weight: 600; opacity: clamp(0, calc(var(--bd1, 0) * 2), 1); scale: calc(.4 + var(--bd1, 0) * .6); }
.bots__c--nora .bots__badge { opacity: clamp(0, calc(var(--bd2, 0) * 2), 1); scale: calc(.4 + var(--bd2, 0) * .6); }
.bots__c--max .bots__badge, .bots__c--nora .bots__badge { position: absolute; right: 12px; top: 50%; margin-top: -10px; }
.bot--ivy .bot__chat > .msg { opacity: 0; translate: 0 14px; transition: opacity 360ms var(--e-out), translate 460ms var(--e-out); }
[data-bs="msg"] .bot--ivy .msg, [data-bs="sent"] .bot--ivy .msg { opacity: 1; translate: 0 0; }
.msg__end { display: grid; margin-top: 11px; }
.msg__end > * { grid-area: 1 / 1; margin: 0 !important; transition: opacity 300ms var(--e-out), translate 360ms var(--e-out); }
.msg__done { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; opacity: 0; translate: 0 6px; }
[data-bs="sent"] .msg__acts { opacity: 0; translate: 0 -6px; }
[data-bs="sent"] .msg__done { opacity: 1; translate: 0 0; }
.create { position: absolute; left: 50%; top: 50%; z-index: 3; width: min(420px, calc(100% - 32px)); translate: -50% calc(-50% + 12px); padding: 20px 22px 18px; border-radius: 18px; background: var(--bg-elevated); border: 1px solid var(--border-strong); box-shadow: var(--float-shadow), 0 34px 80px -18px rgba(0, 0, 0, .85); opacity: 0; visibility: hidden; transition: opacity 260ms var(--e-out), translate 340ms var(--e-out), visibility 0s linear 260ms; }
[data-bs="create"] .create { opacity: 1; visibility: visible; translate: -50% -50%; transition-delay: 0s; }
.create__h { margin: 0 0 12px; font-size: 17px; font-weight: 600; letter-spacing: -.015em; }
.create__faces { display: flex; gap: 10px; margin-bottom: 14px; }
.create__faces i { width: 34px; height: 34px; border-radius: 50%; background: color-mix(in srgb, var(--c) 30%, var(--bg-surface)); border: 1.5px solid color-mix(in srgb, var(--c) 55%, var(--bg-surface)); }
.create__faces i.is-on { box-shadow: 0 0 0 3px var(--bg-elevated), 0 0 0 5px var(--text-2); }
.create__l { margin: 12px 0 5px; font-size: 12.5px; color: var(--text-2); }
.create__in { display: flex; align-items: center; min-height: 40px; padding: 0 12px; border-radius: 10px; background: var(--bg-input); border: 1px solid var(--border-default); font-size: 14.5px; }
.create__in.is-focus { border-color: var(--border-strong); }
.create__in.is-focus .composer__caret { display: inline-block; }
.create__tgs { display: flex; gap: 8px; }
.create__tg { display: inline-flex; align-items: center; gap: 9px; height: 34px; padding: 0 14px 0 10px; border-radius: var(--r-pill); border: 1px solid var(--border-default); font-size: 13.5px; color: var(--text-2); transition: background-color 250ms var(--e-out), color 250ms var(--e-out); }
.create__tg i { position: relative; width: 26px; height: 15px; border-radius: 8px; background: var(--bg-active); transition: background-color 250ms var(--e-out); }
.create__tg i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 11px; height: 11px; border-radius: 50%; background: var(--text-3); transition: translate 250ms var(--e-out), background-color 250ms var(--e-out); }
.create__tg.is-on { color: var(--text-1); border-color: var(--border-strong); }
.create__tg.is-on i { background: var(--ok); }
.create__tg.is-on i::after { translate: 11px 0; background: #fff; }
.create__acts { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }

/* Veil, cursor */
.win__veil { pointer-events: none; }
.veil__name { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.veil__name .ic { width: 22px; height: 22px; color: var(--text-2); }
.veil__ic { display: inline-flex; }
.cursor { position: absolute; left: 0; top: 0; z-index: 8; width: 22px; height: 26px; pointer-events: none; opacity: 0; will-change: translate; }
.cursor svg { display: block; filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .5)); transform-origin: 2px 2px; transition: scale 120ms var(--e-out); }
.cursor.is-press svg { scale: .84; }
.cursor__ring { position: absolute; left: -14px; top: -14px; width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--text-1); opacity: 0; }
.cursor.is-ring .cursor__ring { animation: ring 520ms var(--e-out); }
@keyframes ring { from { opacity: .8; scale: .3; } to { opacity: 0; scale: 1.7; } }


/* ── The story beside the window: tag, title, sentence, live steps ── */
.story__b { display: block; }
.story__tag { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 0 0 22px; }
.story__lab { font-size: 14px; color: var(--text-2); }
.story__b h3 { font-size: clamp(28px, 2.6vw, 40px); font-weight: 600; letter-spacing: -.04em; line-height: 1.04; }
.story__s { margin: 14px 0 22px; max-width: 34ch; font-size: 17px; line-height: 1.5; color: var(--text-2); }
.story__steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.story__steps li { display: flex; align-items: flex-start; gap: 12px; padding: 7px 0; font-size: 15px; line-height: 1.35; color: var(--text-3); transition: color 300ms var(--e-out); }
.story__steps i { position: relative; flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; border: 1.5px solid var(--border-default); box-sizing: border-box; transition: background-color 300ms var(--e-out), border-color 300ms var(--e-out); }
.story__steps li[data-s="act"] { color: var(--text-1); font-weight: 600; }
.story__steps li[data-s="act"] i { border-color: var(--text-1); }
.story__steps li[data-s="act"] i::after { content: ""; position: absolute; inset: 3.5px; border-radius: 50%; background: var(--text-1); }
.story__steps li[data-s="done"] { color: var(--text-2); }
.story__steps li[data-s="done"] i { border-color: var(--ok); background: var(--ok); }
.story__steps li[data-s="done"] i::after { content: ""; position: absolute; left: 4.5px; top: 3.5px; width: 7px; height: 4px; border: solid #fff; border-width: 0 0 1.6px 1.6px; transform: rotate(-45deg); }
.story__also { margin: 20px 0 0; max-width: 36ch; font-size: 13.5px; line-height: 1.5; color: var(--text-3); }
.modes__calm .story__tag { display: none; }
.modes__calm .story__b h3 { font-size: clamp(28px, 2.8vw, 40px); }

/* ── Calm: narrow ── */
.step__win .bot__facts { grid-template-columns: minmax(0, 1fr); }
.step__win .bot__facts li { padding: 8px 16px; }
.step__win .bot__facts li + li { border-left: 0; border-top: 1px solid var(--border-subtle); }
@media (max-width: 1023px) {
    .sm__side { display: none; }
    .modes { padding-top: 120px; }
    .step { grid-template-columns: minmax(0, 1fr); gap: 32px; }
    .wb { margin-left: 0; }
    .bots__rail { padding: 12px 8px; }
    .wb--bots { grid-template-columns: 200px minmax(0, 1fr); }
    .bot__facts { grid-template-columns: minmax(0, 1fr); }
    .bot__facts li { padding: 8px 16px; }
    .bot__facts li + li { border-left: 0; border-top: 1px solid var(--border-subtle); }
}
@media (max-width: 767px) {
    .modes { padding-top: 96px; padding-bottom: 96px; }
    .modes .sec-head { margin-bottom: 48px; }
    .chap + .chap { margin-top: 88px; }
    .wb { height: 640px; }
    .wb__bar > i, .win__title { display: none; }
    .dwin__side { display: none; }
    .dm__build { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
    .dm__side .team__rows, .dm__side .browser__field:nth-of-type(2) { display: none; }
    .wb--bots { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto minmax(0, 1fr); }
    .bots__rail { flex-direction: row; align-items: center; gap: 4px; padding: 8px 10px; border-right: 0; border-bottom: 1px solid var(--border-subtle); }
    .bots__rail-h, .bots__c .led, .bots__who span, .bots__new span { display: none; }
    .bots__c { flex: 1; min-height: 46px; padding: 0 8px; }
    .bots__c--ivy { max-width: 0; flex: 0 0 auto; }
    [data-bs="ivy"] .bots__c--ivy, [data-bs="msg"] .bots__c--ivy, [data-bs="sent"] .bots__c--ivy { max-width: 200px; flex: 1; min-height: 46px; }
    .bots__c--max .bots__badge, .bots__c--nora .bots__badge { right: 4px; top: 6px; margin: 0; min-width: 16px; height: 16px; font-size: 10px; }
    .bots__new { margin: 0; min-height: 0; padding: 0; border-top: 0; }
    .bot__head { padding: 12px 16px; }
    .bot__chat { padding: 16px 16px 20px; }
    .msg { max-width: 94%; }
    .mail, .answer { padding: 14px 16px; }
    .mail__body { font-size: 13px; padding: 10px 0 12px; }
    .modes__seg > *:not(.seg__pill) { padding: 0 10px; }
    .wb__bar .modes__seg > *:not(.seg__pill) { padding: 0 8px; }
    .wb__bar .modes__seg > *:not(.seg__pill) > span { display: none; }
    .sp__s1 { padding: 0 16px 6px; }
    .composer { width: min(100% - 32px, 620px); }
    .create { padding: 16px; }
}

/* ── Pinned ── */
/* The scene overlaps the hero's last screen + 50vh, so for a while both are
   pinned: the hand-off (modes.js) then plays in time, with nothing scrolling. */
html.js:not(.reduce-motion) .modes { --dw: 1080; --dh: 680; --bar: 48px; height: calc(100svh + 400vh); margin-top: calc(-100svh - 50vh); scroll-margin-top: -40vh; padding: 0; border-top: 0; }
html.js:not(.reduce-motion) .modes__stage { position: sticky; top: 0; height: 100svh; pointer-events: none; }
html.js:not(.reduce-motion) .modes__calm { display: none; }
html.js:not(.reduce-motion) .modes .sec-head { position: absolute; top: clamp(48px, 8svh, 88px); left: 0; right: 0; margin: 0 auto; padding: 0 var(--gutter); opacity: calc((1 - var(--hd, 0)) * var(--hi, 1)); translate: 0 calc(var(--hoff, 0) * 1px + var(--hr, 0) * 1px + var(--hd, 0) * -26px); pointer-events: none; z-index: 0; }
html.js:not(.reduce-motion) .story { display: grid; position: absolute; z-index: 3; left: calc(var(--sx, 80) * 1px); width: calc(var(--sw, 340) * 1px); top: calc(var(--wcy, 450) * 1px); transform: translateY(-50%); opacity: var(--cu, 0); pointer-events: none; }
html.js:not(.reduce-motion) .story__b { grid-area: 1 / 1; opacity: 0; visibility: hidden; translate: 0 8px; transition: opacity 300ms var(--e-out), translate 420ms var(--e-out), visibility 0s linear 300ms; }
html.js:not(.reduce-motion) .story[data-ch="0"] .story__b[data-ch="0"], html.js:not(.reduce-motion) .story[data-ch="1"] .story__b[data-ch="1"], html.js:not(.reduce-motion) .story[data-ch="2"] .story__b[data-ch="2"] { opacity: 1; visibility: visible; translate: 0 0; transition: opacity 380ms var(--e-out) 60ms, translate 460ms var(--e-out) 60ms, visibility 0s; }
html.js:not(.reduce-motion) .mrail { display: flex; gap: 12px; position: absolute; right: var(--pad-x); top: 40px; z-index: 4; opacity: var(--cu, 0); }
.mrail i { position: relative; width: min(48px, 9vw); height: 2px; border-radius: 2px; overflow: hidden; background: var(--border-default); }
.mrail i::after { content: ""; position: absolute; inset: 0; background: var(--text-1); transform-origin: left; transform: scaleX(0); }
.mrail i:nth-child(1)::after { transform: scaleX(var(--r0, 0)); }
.mrail i:nth-child(2)::after { transform: scaleX(var(--r1, 0)); }
.mrail i:nth-child(3)::after { transform: scaleX(var(--r2, 0)); }

html.js:not(.reduce-motion) :is(.win, .wb--live, .win__veil) { position: absolute; left: calc(var(--bl, 0) * 1px); top: calc(var(--bt, 0) * 1px); width: calc(var(--dw) * 1px); height: calc(var(--dh) * 1px); max-width: none; margin: 0; transform-origin: 50% 0; scale: var(--bs, 1); border-radius: 16px; }
html.js:not(.reduce-motion) .win { display: block; z-index: 1; overflow: hidden; border: 1px solid var(--border-default); background: var(--canvas-simple); box-shadow: var(--float-shadow); transition: background-color 400ms var(--e-out); }
html.js:not(.reduce-motion) .win[data-mode="developer"] { background: var(--code-bg); }
html.js:not(.reduce-motion) .win__bar { transition: background-color 400ms var(--e-out); }
html.js:not(.reduce-motion) .win[data-mode="developer"] .win__bar { background: var(--bg-base); }
html.js:not(.reduce-motion) .wb--live { z-index: 2; pointer-events: none; padding-top: var(--bar); border: 0; background: transparent; box-shadow: none; overflow: hidden; opacity: 0; visibility: hidden; translate: 0 10px; transition: opacity 300ms var(--e-out), translate 400ms var(--e-out), visibility 0s linear 300ms; }
html.js:not(.reduce-motion) .wb--live.wb--simple { display: flex; }
html.js:not(.reduce-motion) .wb--live.wb--dev { display: flex; }
html.js:not(.reduce-motion) .wb--live.wb--bots { display: grid; grid-template-rows: minmax(0, 1fr); }
html.js:not(.reduce-motion) .wb--live.is-on { opacity: 1; visibility: visible; translate: 0 0; transition: opacity 360ms var(--e-out) 60ms, translate 460ms var(--e-out) 60ms, visibility 0s; }
html.js:not(.reduce-motion) .wb--live .wb__bar { display: none; }
html.js:not(.reduce-motion) .cursor { display: block; }
html.js:not(.reduce-motion) .composer__caret { display: inline-block; animation: blink 1.1s steps(1) infinite; }
html.js:not(.reduce-motion) .composer:not(.is-focus) .composer__caret, html.js:not(.reduce-motion) .dcomposer:not(.is-focus) .composer__caret { display: none; }
html.js:not(.reduce-motion) .create__in:not(.is-focus) .composer__caret { display: none; }
html.js:not(.reduce-motion) .dwin__caret { animation: blink 1.1s steps(1) infinite; }
html.js:not(.reduce-motion) .win__veil { display: block; z-index: 5; overflow: hidden; pointer-events: none; }
html.js:not(.reduce-motion) .veil__in { position: absolute; inset: var(--bar) 0 0 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: var(--bg-surface); opacity: 0; transition: opacity 220ms var(--e-io); }
html.js:not(.reduce-motion) .carrier.is-veil .veil__in { opacity: 1; }
html.js:not(.reduce-motion) .carrier { display: block; position: fixed; inset: 0; z-index: 40; pointer-events: none; animation: visual-in 800ms var(--e-out) 400ms both; }
html.js:not(.reduce-motion) .win__nav { pointer-events: auto; }
.veil__mark { width: 64px; height: 64px; }
html.js:not(.reduce-motion) .modes__anchor { position: absolute; }
html.js:not(.reduce-motion) .composer__caret + .composer__hint { }

@media (max-width: 1023px) {
    html.js:not(.reduce-motion) .story { left: var(--gutter); right: var(--gutter); width: auto; top: calc(var(--sy, 600) * 1px); transform: none; }
    html.js:not(.reduce-motion) .story__tag { margin-bottom: 10px; }
    html.js:not(.reduce-motion) .story__b h3 { font-size: 30px; }
    html.js:not(.reduce-motion) .story__s { margin: 8px 0 10px; max-width: 60ch; font-size: 15px; }
    html.js:not(.reduce-motion) .story__steps li { padding: 3px 0; font-size: 14.5px; }
    html.js:not(.reduce-motion) .story__also { margin-top: 8px; font-size: 13px; }
}
@media (min-width: 768px) and (max-width: 1023px) {
    html.js:not(.reduce-motion) .modes { --dw: 720; --dh: 620; }
    html.js:not(.reduce-motion) .modes .sec-head h2 { font-size: clamp(40px, 8vw, 56px); }
}
@media (max-width: 767px) {
    html.js:not(.reduce-motion) .modes { --dw: 440; --dh: 640; }
    html.js:not(.reduce-motion) .story__tag { gap: 8px; margin-bottom: 8px; }
    html.js:not(.reduce-motion) .story__lab { display: none; }
    html.js:not(.reduce-motion) .story__b h3 { font-size: 24px; }
    html.js:not(.reduce-motion) .story__s { margin: 6px 0 8px; font-size: 14px; line-height: 1.42; }
    html.js:not(.reduce-motion) .story__steps li { display: none; }
    html.js:not(.reduce-motion) .story__steps[data-cur="0"] li:nth-child(1), html.js:not(.reduce-motion) .story__steps[data-cur="1"] li:nth-child(2), html.js:not(.reduce-motion) .story__steps[data-cur="2"] li:nth-child(3) { display: flex; }
    html.js:not(.reduce-motion) .story__also { display: none; margin-top: 6px; }
    html.js:not(.reduce-motion) .story__b[data-done] .story__also { display: block; }
    html.js:not(.reduce-motion) .mrail { left: var(--pad-x); right: auto; }
    html.js:not(.reduce-motion) .modes .sec-head h2 { font-size: 40px; }
    html.js:not(.reduce-motion) .modes .sec-head .lede { font-size: 16px; }
    html.js:not(.reduce-motion) .wb--live.wb--bots { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
}

/* ── Hero → modes hand-off (modes.js) ──
   The hero mark's copy (.flyer) lands on the Hello mark. */
.flyer { display: none; }
html.js:not(.reduce-motion) .flyer { display: block; position: fixed; left: 0; top: 0; z-index: 45; pointer-events: none; transform-origin: 0 0; visibility: hidden; will-change: transform; filter: drop-shadow(0 calc(var(--glow, 0) * 18px) calc(var(--glow, 0) * 30px) rgba(0, 0, 0, .55)); }
html.js:not(.reduce-motion) .flyer.is-on { visibility: visible; }
html.js:not(.reduce-motion) .carrier.is-fly .home__mark { visibility: hidden; }
