:root{color-scheme:light;font-family:system-ui,sans-serif;background:#faf9f6;color:#202b36}body{margin:0}main{max-width:1050px;margin:auto;padding:16px clamp(12px,3vw,32px)}header{border-bottom:1px solid #41536a;padding-bottom:8px}h1{font-size:clamp(1.6rem,5vw,2.5rem)}h2{font-size:1.2rem;margin-top:28px}p,li{line-height:1.6;overflow-wrap:anywhere}form{max-width:420px}label{display:block;margin:16px 0}input{display:block;box-sizing:border-box;width:100%;padding:12px;margin-top:8px;border:1px solid #8194aa;border-radius:6px;background:#fff;color:inherit}button{padding:12px 18px;border:0;border-radius:6px;background:#a8dacd;color:#10231e;cursor:pointer;font-weight:600}button:focus-visible,input:focus-visible{outline:3px solid #ffd17a;outline-offset:3px}.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px}.cards p,li{background:#fff;padding:16px;border-radius:8px}ol{padding-left:24px}[hidden]{display:none!important}
#timeline{display:flex;flex-direction:column;gap:18px;list-style:none;padding:12px 0;overflow-y:auto;scroll-behavior:smooth}.handoff{width:min(78%,700px);box-sizing:border-box;background:transparent;padding:0}.handoff.left{align-self:flex-start}.handoff.right{align-self:flex-end}.bubble{border:2px solid var(--state);border-left-width:7px;border-radius:16px;padding:12px 18px;background:#fff}.orange{--state:#a65d00}.green{--state:#18733d}.white{--state:#89939f}.red{--state:#b42332}.transmission{margin:5px 8px;font-size:.85rem;color:#445264}.right .transmission{text-align:right}details{font-size:.85rem;margin:8px}summary{cursor:pointer}pre{white-space:pre-wrap;overflow-wrap:anywhere}h3{margin:0;font-size:1rem}@media(max-width:540px){.handoff{width:94%}}@media(prefers-reduced-motion:reduce){#timeline{scroll-behavior:auto}}

html,body{height:100%}main{box-sizing:border-box;height:100vh;height:100dvh;display:flex;flex-direction:column;padding-bottom:0}header{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-shrink:0}h1{font-size:clamp(1.1rem,3vw,1.6rem);margin:8px 0}#message:empty{display:none}#dashboard{flex:1;min-height:0;display:flex;flex-direction:column;padding-bottom:calc(132px + env(safe-area-inset-bottom))}#timeline{flex:1;min-height:0;margin:0}.source-details{flex-shrink:0;max-height:20vh;overflow:auto}#composer{position:fixed;bottom:0;left:0;right:0;z-index:2;box-sizing:border-box;padding:12px max(12px,calc((100vw - 986px)/2)) calc(12px + env(safe-area-inset-bottom));background:#faf9f6;border-top:1px solid #89939f}.composer-row{display:flex;gap:10px;align-items:center}.composer-row input{margin:0;min-width:0;flex:1}.composer-row button{flex:0 0 48px;width:48px;height:48px;font-size:1.4rem;padding:8px}#composer-state{font-size:.8rem;margin:8px 0 0;line-height:1.4}input:disabled{opacity:1;background:#fff;color:#445264}input::placeholder{color:#526170;opacity:1}button:disabled{opacity:1;cursor:not-allowed;background:#dce2e7;color:#344454}@media(max-width:540px){.bubble{padding:10px 12px}.handoff{width:94%}header button{padding:10px}#dashboard{padding-bottom:calc(148px + env(safe-area-inset-bottom))}}

/* V4 authenticated objective control. Kept additive for a byte-simple V3 rollback. */
input,textarea{display:block;box-sizing:border-box;width:100%;padding:12px;margin-top:8px;border:1px solid #8194aa;border-radius:6px;background:#fff;color:inherit;font:inherit}textarea{resize:vertical;min-height:48px;max-height:180px}textarea:focus-visible{outline:3px solid #ffd17a;outline-offset:3px}header h1{margin-bottom:2px}#mission-status{margin:0 0 7px;font-size:.9rem;color:#526170}#plan-card{border:2px solid #18733d;border-radius:12px;background:#fff;padding:14px;margin:10px 0}#plan-card h2{margin:0 0 8px}.plan-actions{display:flex;gap:10px;flex-wrap:wrap}.secondary{background:#e5e9ed;color:#293844}#composer{max-width:none}.composer-row textarea{margin:0;min-width:0;flex:1}textarea:disabled{opacity:1;background:#fff;color:#445264}textarea::placeholder{color:#526170;opacity:1}@media(max-width:540px){#dashboard{padding-bottom:calc(164px + env(safe-area-inset-bottom))}}

/* V5 supervision cockpit: factual status, heartbeat and mission progression. */
#supervision{flex-shrink:0;padding:12px 0;border-bottom:1px solid #d8dee6;background:#faf9f6}.now-card{display:flex;align-items:flex-start;gap:14px;padding:14px 16px;border:1px solid #ccd5df;border-radius:14px;background:#fff;box-shadow:0 4px 18px rgba(25,43,62,.07)}.now-card h2{margin:2px 0 4px;font-size:1.15rem}.now-card p{margin:0;line-height:1.45}.eyebrow{display:block;color:#526170;font-size:.78rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase}.freshness{display:flex;gap:14px;flex-wrap:wrap;color:#526170;font-size:.82rem;margin-top:5px!important}.status-light{display:inline-block;flex:0 0 13px;width:13px;height:13px;border-radius:50%;margin-top:5px;border:2px solid #fff;box-shadow:0 0 0 1px #8996a5}.status-light.working{background:#20a464;box-shadow:0 0 0 1px #167044,0 0 0 5px rgba(32,164,100,.12)}.status-light.error{background:#d83443;box-shadow:0 0 0 1px #a91f2e,0 0 0 5px rgba(216,52,67,.12)}.status-light.done{background:#fff;box-shadow:0 0 0 2px #6f7c89}.status-light.waiting{background:#ef9d25;box-shadow:0 0 0 1px #a65d00}.status-light.idle{background:#aab3bd}.operator-board{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:10px 0}.operator-board article{display:flex;gap:9px;min-width:0;padding:9px 10px;border:1px solid #d8dee6;border-radius:10px;background:#fff}.operator-board article div{min-width:0}.operator-board strong,.operator-board article span:last-child{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.operator-board strong{font-size:.85rem}.operator-board article span:last-child{color:#526170;font-size:.76rem;margin-top:2px}.progress{display:grid;grid-template-columns:repeat(6,1fr);gap:0;list-style:none;margin:8px 0 0;padding:0;counter-reset:step}.progress li{position:relative;background:transparent;border-radius:0;padding:25px 4px 0;text-align:center;color:#647180;font-size:.72rem;line-height:1.25}.progress li:before{counter-increment:step;content:counter(step);position:absolute;top:0;left:50%;z-index:1;display:grid;place-items:center;width:20px;height:20px;transform:translateX(-50%);border:2px solid #aab3bd;border-radius:50%;background:#fff;font-weight:700}.progress li:not(:first-child):after{content:"";position:absolute;top:10px;right:50%;width:100%;height:2px;background:#cbd3dc}.progress .complete:before{content:"✓";color:#fff;border-color:#2476d2;background:#2476d2}.progress .complete:after,.progress .current:after{background:#2476d2}.progress .current{color:#17283a;font-weight:700}.progress .current:before{color:#fff;border-color:#20a464;background:#20a464;box-shadow:0 0 0 4px rgba(32,164,100,.13)}.progress .problem{color:#a91f2e;font-weight:700}.progress .problem:before{content:"!";color:#fff;border-color:#d83443;background:#d83443}.thread-heading{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-top:10px}.thread-heading h2{margin:0;font-size:1rem}.thread-heading span{color:#647180;font-size:.76rem}.transmission.sent{color:#1469c9;font-weight:650}.handoff.green .bubble{box-shadow:0 4px 16px rgba(24,115,61,.08)}.handoff.red .bubble{background:#fff7f8}.handoff.white .bubble{background:#f8fafc}.handoff .bubble h3{text-transform:none}.source-details{border-top:1px solid #d8dee6;padding-top:2px}
@media(max-width:760px){.operator-board{display:flex;overflow-x:auto;padding-bottom:4px}.operator-board article{flex:0 0 165px}.progress{overflow-x:auto;grid-template-columns:repeat(6,110px)}.thread-heading span{display:none}.now-card{padding:12px}.freshness{gap:8px}}
