/* Agent Onboarding demo: connections made once, an agent's identity and limits, its first task, then the next agent. Drawn on the page: type, hairlines, one accent. */
.ao button {font:inherit;color:inherit;background:none;border:0;padding:0;text-align:left;cursor:pointer}
.ao button:focus-visible {outline:1px solid var(--oxide);outline-offset:4px}
.ao-h {min-height:1.05em;font:400 clamp(2.1rem,4.2vw,4.4rem)/1.04 'Fraunces','Fraunces Fallback',Georgia,serif;letter-spacing:-.025em;color:var(--ink)}
.ao-w {display:inline-block;animation:ao-word .6s var(--ease) both}
@keyframes ao-word {from{opacity:0;filter:blur(6px);transform:translateY(.18em)}to{opacity:1;filter:none;transform:none}}

/* The three agents, as words to pick */
.ao-pick {display:flex;flex-wrap:wrap;gap:.4rem clamp(1.4rem,3vw,2.6rem);margin-top:1.3rem;font-size:1rem;transition:opacity .5s}
.ao-pick button {color:var(--ink-2);text-decoration:underline;text-decoration-color:transparent;text-decoration-thickness:1px;text-underline-offset:.4em;transition:color .25s,text-decoration-color .25s}
.ao-pick button span {margin-left:.45em;font-size:.8125rem;color:var(--ink-2)}
.ao-pick button:hover {color:var(--oxide)}
.ao-pick button[aria-pressed="true"] {color:var(--ink);text-decoration-color:var(--oxide)}
.ao[data-phase]:not([data-phase="done"]) .ao-pick button {cursor:default}
.ao[data-phase="connect"] .ao-pick {opacity:.35}

.ao-stage {position:relative;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.95fr) minmax(0,1fr);gap:clamp(2rem,5vw,5rem);margin-top:clamp(1.8rem,3vw,2.6rem);padding-top:clamp(1.6rem,2.6vw,2.2rem);border-top:1px solid var(--rule);min-height:27rem}

/* Connections */
.ao-sources {list-style:none;margin:0;padding:0;align-self:start}
.ao-sources li {display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:1rem;padding:.6rem 0;border-bottom:1px solid var(--rule);font-size:.875rem;line-height:1.35;transition:opacity .5s var(--ease)}
.ao-sources b {font-weight:500;color:var(--ink)}
.ao-sources b::before {content:'';display:inline-block;width:6px;height:6px;margin-right:.55rem;border-radius:50%;background:var(--oxide);vertical-align:.12em;transition:opacity .4s,transform .5s var(--ease)}
.ao-sources span {grid-column:1;color:var(--ink-2);font-size:.8125rem}
.ao-sources em {grid-column:2;grid-row:1/3;align-self:center;max-width:9.5rem;font-style:normal;font-size:.75rem;line-height:1.3;color:var(--ink);text-align:right;transition:opacity .4s,color .4s}
.ao-sources em.is-gated {color:var(--oxide)}
.ao-sources li:not(.is-used) em {color:var(--ink-2)}
.ao-sources li:not(.is-used) b,.ao-sources li:not(.is-used) span {opacity:.5}
.ao[data-phase] .ao-sources li:not(.is-live) {opacity:.22}
.ao[data-phase] .ao-sources li:not(.is-live) b::before {opacity:0;transform:scale(.2)}
.ao[data-phase="connect"] .ao-sources em {opacity:0}
.ao[data-phase="connect"] .ao-sources li b,.ao[data-phase="connect"] .ao-sources li span {opacity:1}

/* One agent: identity and limits, then the first task */
.ao-agent {display:none}
.ao-agent.is-active {display:contents}
.ao-card,.ao-task {align-self:start;min-width:0}
.ao-name {font:400 clamp(2.6rem,4vw,3.6rem)/.95 'Fraunces','Fraunces Fallback',Georgia,serif;letter-spacing:-.03em;color:var(--ink)}
.ao-id {margin:1.3rem 0 0;display:grid;gap:.5rem}
.ao-id div {display:grid;grid-template-columns:5.2rem minmax(0,1fr);gap:.8rem;font-size:.875rem;line-height:1.45}
.ao-id dt {color:var(--ink-2)}
.ao-id dd {margin:0;color:var(--ink)}
.ao-gates {list-style:none;margin:1.3rem 0 0;padding:1.1rem 0 0;border-top:1px solid var(--rule);display:grid;gap:.7rem}
.ao-gates li {display:grid;gap:.05rem;padding-left:.9rem;border-left:1px solid var(--oxide);font-size:.875rem;line-height:1.4}
.ao-gates b {font-weight:500;color:var(--ink)}
.ao-gates span {color:var(--ink-2)}
.ao-msg {padding-left:1rem;border-left:1px solid var(--ink);font:400 1.2rem/1.4 'Fraunces','Fraunces Fallback',Georgia,serif;color:var(--ink)}
.ao-msg span {display:block;margin-bottom:.35rem;font:400 .8125rem/1.3 'Hanken Grotesk','Hanken Fallback',Arial,sans-serif;color:var(--ink-2)}
.ao-steps {list-style:none;margin:1.2rem 0 0;padding:0;display:grid;gap:.45rem;font-size:.875rem;line-height:1.4;color:var(--ink-2)}
.ao-steps li {padding-left:1.1rem;position:relative}
.ao-steps li::before {content:'';position:absolute;left:0;top:.62em;width:.5rem;height:1px;background:var(--oxide)}
.ao-draft {margin-top:1.3rem;padding-top:1.1rem;border-top:1px solid var(--rule)}
.ao-draft-k {font-size:.8125rem;line-height:1.3;color:var(--oxide)}
.ao-sent {display:none;color:var(--ink)}
.ao-draft-t {margin-top:.45rem;font:400 1.1rem/1.45 'Fraunces','Fraunces Fallback',Georgia,serif;color:var(--ink)}
.ao .ao-approve {margin-top:.8rem;font-size:.9375rem;color:var(--oxide);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:.3em;transition:color .25s}
.ao .ao-approve:hover {color:var(--ink)}
.ao-draft.is-approved .ao-wait,.ao-draft.is-approved .ao-approve {display:none}
.ao-draft.is-approved .ao-sent {display:inline;animation:ao-in .5s var(--ease) both}
.ao[data-phase]:not([data-phase="done"]) .ao-approve {visibility:hidden}

/* Reveal. Without a phase the markup shows a finished onboarding. */
.ao[data-phase] [data-r] {transition:opacity .45s var(--ease),transform .55s var(--ease)}
.ao[data-phase] [data-r]:not(.is-on) {opacity:0;transform:translateY(8px)}
.ao[data-phase] .is-quick [data-r] {transition-delay:calc(var(--i,0) * 55ms)}
@keyframes ao-in {from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

.ao-wires {position:absolute;inset:0;width:100%;height:100%;pointer-events:none;overflow:visible}
.ao-wires path {fill:none;stroke:var(--oxide);stroke-width:1;opacity:.5;transition:stroke-dashoffset .8s var(--ease)}
.ao[data-instant] * {transition:none!important;animation:none!important}

@media(max-width:1100px){
 .ao-stage {grid-template-columns:minmax(0,1fr) minmax(0,1fr);row-gap:2.4rem}
 .ao-task {grid-column:2}
 .ao-sources {grid-row:1/3}
}
@media(max-width:900px){
 .ao-stage {grid-template-columns:1fr;gap:2.2rem;min-height:0}
 .ao-task,.ao-sources {grid-column:auto;grid-row:auto}
 .ao-wires {display:none}
 .ao-sources em {max-width:8.5rem}
}
.ao[data-phase="connect"] .ao-agent {visibility:hidden}
@media(max-width:900px){
 .ao-sources span {display:none}
 .ao-sources li {padding:.5rem 0}
 .ao-sources em {grid-row:1}
}
.ao-sources b {white-space:nowrap}
@media(max-width:900px){
 .ao-sources em {max-width:7.5rem}
}
