:root{
  color-scheme:dark;
  --bg:#0f0f10;
  --surface:#171718;
  --surface-2:#1d1d1f;
  --surface-3:#242427;
  --line:#2d2d30;
  --line-soft:#242426;
  --ink:#f4f4f2;
  --muted:#aaa9a5;
  --muted-2:#74736f;
  --accent:#d8d4ff;
  --accent-strong:#8f83ff;
  --danger:#ff858c;
  --warning:#e8bf72;
  --success:#79d7a8;
  --shadow:0 24px 80px rgba(0,0,0,.38);
  --sidebar:230px;
  --radius:16px;
  font:15px/1.5 Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif
}
*{box-sizing:border-box}
[hidden]{display:none!important}
html,body{min-height:100%;background:var(--bg)}
body{margin:0;color:var(--ink);-webkit-font-smoothing:antialiased}
body[data-view="auth"] #app-view{display:none!important}
body[data-view="app"] #auth-view{display:none!important}
button,input,textarea,select{font:inherit}
button{cursor:pointer}
button:disabled{opacity:.42;cursor:not-allowed}
button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible,summary:focus-visible{outline:2px solid var(--accent-strong);outline-offset:2px}
h1,h2,h3,p{margin-top:0}
h1{font-size:2rem;line-height:1.08;letter-spacing:-.045em;margin-bottom:.55rem}
h2{font-size:1.85rem;line-height:1.12;letter-spacing:-.04em;margin-bottom:.5rem}
h3{font-size:1rem;letter-spacing:-.015em;margin-bottom:.35rem}
small,.muted{color:var(--muted)}
.eyebrow{font-size:.66rem;font-weight:800;letter-spacing:.11em;color:var(--muted-2);margin:0 0 .16rem}
.soft-badge{display:inline-flex;align-items:center;border:1px solid var(--line);background:#18181a;color:#b9b8b4;border-radius:999px;padding:.3rem .58rem;font-size:.7rem;font-weight:700}




/* Authentication: deliberately separate from the application shell. */
.auth{min-height:100vh;display:grid;place-items:center;padding:2rem 1.2rem;background:radial-gradient(circle at 50% 14%,rgba(143,131,255,.08),transparent 26rem),var(--bg)}
.auth-page{width:min(100%,430px);display:grid;gap:1.4rem}
.auth-logo{display:flex;align-items:center;justify-content:center;gap:.72rem;color:var(--ink);text-decoration:none;font-size:1rem}
.auth-card{border:1px solid var(--line);background:#141415;border-radius:22px;padding:2rem;box-shadow:0 22px 70px rgba(0,0,0,.24)}
.auth-copy{text-align:center;margin-bottom:1.6rem}.auth-copy h1{font-size:1.85rem}.auth-copy p{margin:0}
.auth-form{display:grid;gap:1rem}.auth-form h3{font-size:1.18rem;margin:.3rem 0 -.2rem}
.auth-form label,.form-card label,.advanced-body label{display:grid;gap:.42rem;font-weight:650;color:#e8e8e5;font-size:.88rem}
.auth-form input,.form-card input,.form-card textarea,.advanced-body input,select{width:100%;border:1px solid var(--line);background:#101011;color:var(--ink);border-radius:12px;padding:.86rem .92rem;transition:border-color .15s,box-shadow .15s,background .15s}
.auth-form input:hover,.form-card input:hover,.form-card textarea:hover,.advanced-body input:hover,select:hover{border-color:#3b3b3f}
.auth-form input:focus,.form-card input:focus,.form-card textarea:focus,.advanced-body input:focus,select:focus{border-color:#7970c9;box-shadow:0 0 0 3px rgba(143,131,255,.1);background:#121214;outline:0}
.password-field{position:relative;display:block}.password-field input{padding-right:4.1rem}.input-action{position:absolute;right:.42rem;top:50%;transform:translateY(-50%);border:0;background:transparent;color:#bcb7ff;font-size:.76rem;font-weight:700;padding:.42rem .5rem}
.primary,.secondary,.danger,.logout-btn{border-radius:11px;padding:.76rem .95rem;font-weight:730;border:1px solid var(--line);transition:background .15s,border-color .15s,transform .1s}
.primary{background:#f2f0ea;border-color:#f2f0ea;color:#151516}.primary:hover{background:white}.primary:active,.secondary:active{transform:translateY(1px)}
.secondary{background:#1c1c1e;color:var(--ink)}.secondary:hover{background:#232326;border-color:#3a3a3e}.full{width:100%}
.text-link{border:0;background:transparent;color:#aaa9a5;padding:.1rem 0;font-weight:650;text-align:left;width:max-content}.text-link:hover{color:white}
.auth-row{display:flex;justify-content:flex-end;margin-top:-.35rem}.auth-submit{width:100%;min-height:44px;margin-top:.12rem}.auth-submit.busy{opacity:.72;pointer-events:none}.auth-submit.busy span:after{content:"…";display:inline-block;width:1.1em;text-align:left}
.auth-divider{display:flex;align-items:center;gap:.72rem;color:var(--muted-2);font-size:.74rem;margin:1.35rem 0 .85rem}.auth-divider:before,.auth-divider:after{content:"";height:1px;background:var(--line-soft);flex:1}
.field-help{font-size:.74rem;color:var(--muted-2);margin:-.55rem 0 0}.auth-footnote{text-align:center;color:var(--muted-2);font-size:.73rem;margin:0}.verification-icon{display:grid;place-items:center;width:2.35rem;height:2.35rem;border-radius:50%;background:rgba(121,215,168,.08);border:1px solid rgba(121,215,168,.2);color:var(--success);font-weight:900}
.dev-action{display:block;margin:1rem 0 0;padding:.72rem .9rem;border-radius:11px;background:rgba(143,131,255,.09);border:1px solid rgba(143,131,255,.2);color:#c6c0ff;font-weight:700;text-decoration:none;text-align:center}.error{color:#ffd9dc;background:#261416;border:1px solid #5e3337;padding:.72rem .82rem;border-radius:11px;margin:1rem 0 0}.auth-notice{margin:-.35rem 0 1rem;padding:.7rem .8rem;border:1px solid rgba(232,191,114,.22);background:rgba(232,191,114,.06);border-radius:11px;color:#dfc992;font-size:.8rem}

/* Application shell */
.shell{min-height:100vh;display:grid;grid-template-columns:var(--sidebar) minmax(0,1fr);transition:grid-template-columns .18s ease}
.shell.sidebar-collapsed{--sidebar:72px}
.sidebar{position:sticky;top:0;height:100vh;padding:.72rem .62rem;border-right:1px solid var(--line-soft);display:flex;flex-direction:column;background:#111112;overflow:hidden}
.sidebar-top{display:grid;gap:.55rem}.brand-row{height:48px;display:flex;align-items:center;gap:.65rem;padding:.25rem .35rem}.brand-name{white-space:nowrap}.sidebar-collapse{margin-left:auto}.icon-button{display:grid;place-items:center;width:32px;height:32px;border-radius:9px;border:0;background:transparent;color:var(--muted)}.icon-button:hover{background:#1c1c1e;color:white}
.new-action{width:100%;height:42px;display:flex;align-items:center;gap:.6rem;border:1px solid var(--line);background:#1a1a1c;color:var(--ink);border-radius:11px;padding:0 .72rem;text-align:left;font-weight:700}.new-action:hover{background:#202023}.new-action kbd{margin-left:auto;color:#6f6e6a;font-size:.62rem;font-weight:600;background:transparent}
nav{display:grid;gap:.14rem;flex:1;align-content:start;margin-top:.7rem}nav button{position:relative;display:flex;align-items:center;gap:.68rem;width:100%;height:40px;text-align:left;background:transparent;color:#aaa9a5;border:1px solid transparent;border-radius:10px;padding:0 .68rem;font-weight:620}nav button:hover{background:#19191b;color:#f2f1ee}nav button.active{background:#202022;color:#fff}.nav-icon{width:1.1rem;text-align:center;color:#85847f}.nav-badge{margin-left:auto;min-width:1.3rem;height:1.3rem;display:grid;place-items:center;border-radius:999px;background:#403b69;color:#e1ddff;font-size:.66rem}.nav-copy{white-space:nowrap}
.sidebar-footer{border-top:1px solid var(--line-soft);padding-top:.62rem}.sidebar-account{width:100%;display:flex;align-items:center;gap:.62rem;border:0;background:transparent;color:var(--ink);border-radius:10px;padding:.5rem;text-align:left}.sidebar-account:hover{background:#19191b}.account-avatar{display:grid;place-items:center;flex:0 0 30px;height:30px;border-radius:50%;background:#29292c;color:#d9d7d0;font-size:.75rem;font-weight:800}.account-copy{display:grid;line-height:1.18}.account-copy strong{font-size:.8rem}.account-copy small{font-size:.66rem}.logout-btn{width:100%;background:transparent;color:#8e8d89;text-align:left;border-color:transparent;padding:.58rem .65rem;margin-top:.2rem}.logout-btn:hover{background:#19191b;color:white}
.shell.sidebar-collapsed .brand-name,.shell.sidebar-collapsed .nav-copy,.shell.sidebar-collapsed .new-action kbd,.shell.sidebar-collapsed .account-copy,.shell.sidebar-collapsed .logout-btn{display:none}.shell.sidebar-collapsed .new-action{justify-content:center;padding:0}.shell.sidebar-collapsed nav button{justify-content:center;padding:0}.shell.sidebar-collapsed .nav-badge{position:absolute;right:4px;top:3px}.shell.sidebar-collapsed .sidebar-account{justify-content:center}
/* The reopen control must stay visible and reachable in the collapsed rail -
   a hidden-by-CSS toggle with no other way back is a dead end (V4.3 P0 nav
   fix). Centered like the other icon-only controls in this state. */
.shell.sidebar-collapsed .brand-row{justify-content:center}
.shell.sidebar-collapsed .sidebar-collapse{margin-left:0}
.content{min-width:0;padding:0 2rem 4rem}.topbar{height:68px;display:flex;align-items:center;gap:.8rem;border-bottom:1px solid var(--line-soft);max-width:1180px;margin:0 auto}.topbar-copy{flex:1}.topbar h1{font-size:1rem;margin:0;letter-spacing:-.02em}.topbar .eyebrow{display:none}.health-pill{display:flex;align-items:center;gap:.48rem;border:1px solid var(--line);border-radius:999px;padding:.4rem .62rem;color:var(--muted);font-size:.72rem;background:#151516}.health-dot,.status-dot{width:.46rem;height:.46rem;border-radius:50%;background:var(--muted-2)}.health-pill.ok .health-dot,.status-dot.ok{background:var(--success)}.health-pill.warn .health-dot,.status-dot.warn{background:var(--warning)}.health-pill.bad .health-dot,.status-dot.bad{background:var(--danger)}
.mobile-menu{display:none}.panel{display:none}.panel.active{display:block}.toast{position:sticky;top:.8rem;z-index:20;max-width:900px;margin:.8rem auto 0;box-shadow:var(--shadow)}
.panel-narrow{width:min(100%,900px);margin:0 auto;padding-top:2.2rem}

/* Home: intentionally calm and chat-first. */
.home-stage{width:min(100%,900px);margin:0 auto;padding:clamp(3rem,9vh,6.5rem) 0 2rem}.home-hero{text-align:center;margin:0 auto 2.4rem;max-width:760px}.home-hero h2{font-size:clamp(2.1rem,4vw,3.15rem);letter-spacing:-.055em;margin:.9rem 0 .65rem}.home-hero>p{color:var(--muted);font-size:1rem;margin-bottom:1.55rem}
.command-composer{display:flex;align-items:center;gap:.55rem;background:#1b1b1d;border:1px solid #343437;border-radius:20px;padding:.55rem .58rem .55rem 1rem;box-shadow:0 14px 45px rgba(0,0,0,.18);text-align:left}.command-composer:focus-within{border-color:#514e68;box-shadow:0 0 0 3px rgba(143,131,255,.06),0 14px 45px rgba(0,0,0,.18)}.command-composer input{flex:1;min-width:0;background:transparent;border:0;color:var(--ink);padding:.55rem .15rem;outline:0;font-size:.95rem}.command-composer input::placeholder{color:#777671}.composer-send{display:grid;place-items:center;width:36px;height:36px;border:0;border-radius:50%;background:#eceae4;color:#151516;font-size:1rem;font-weight:900}.composer-send:hover{background:white}
.quick-actions{display:flex;justify-content:center;flex-wrap:wrap;gap:.45rem;margin-top:.75rem}.quick-actions button{border:1px solid var(--line);background:#141415;color:#9e9d99;border-radius:999px;padding:.48rem .7rem;font-size:.75rem}.quick-actions button:hover{background:#1c1c1e;color:white}
.attention-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.7rem;margin:1.25rem 0}.attention-card{display:grid;gap:.18rem;text-align:left;border:1px solid var(--line-soft);background:#141415;color:var(--ink);border-radius:14px;padding:.95rem 1rem}.attention-card:hover{background:#19191b;border-color:#343437}.attention-card span{font-size:.74rem;color:var(--muted)}.attention-card strong{font-size:1rem;letter-spacing:-.02em}.attention-card small{font-size:.7rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.setup-card,.form-card,.automation-card{border:1px solid var(--line);background:#151516;border-radius:var(--radius);padding:1.15rem;margin:1rem 0}.setup-card{margin-top:1.4rem}.section-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:1rem;margin-bottom:1.1rem}.section-heading.compact{margin-bottom:.75rem}.section-heading h2,.section-heading h3{margin-bottom:.3rem}.section-heading p{margin-bottom:0}.progress-label{color:var(--muted);font-weight:700;font-size:.76rem}.progress-track{height:.26rem;background:#27272a;border-radius:999px;overflow:hidden;margin:.7rem 0 .85rem}.progress-track span{display:block;width:0;height:100%;background:#bdb7ff;transition:width .2s ease}.setup-list{display:grid;gap:.42rem}.setup-step{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:.78rem;width:100%;text-align:left;border:0;background:transparent;color:var(--ink);border-radius:11px;padding:.7rem}.setup-step:hover{background:#1c1c1e}.setup-step strong,.setup-step small{display:block}.setup-step small{margin-top:.1rem;font-size:.7rem}.step-check{width:1.7rem;height:1.7rem;border-radius:50%;display:grid;place-items:center;border:1px solid var(--line);color:var(--muted);font-weight:750;font-size:.7rem}.setup-step.done .step-check{background:rgba(121,215,168,.08);border-color:rgba(121,215,168,.2);color:var(--success);font-size:0}.setup-step.done .step-check:after{content:"✓";font-size:.76rem}.setup-step.done strong{color:#8f8e8a}.step-arrow{color:var(--muted-2)}
.home-footer-actions{display:flex;justify-content:center;align-items:center;gap:.55rem;color:#55544f;font-size:.73rem;margin-top:1rem}.system-shadow{position:absolute;left:-99999px;width:1px;height:1px;overflow:hidden}

/* Work panels */
.form-card textarea{min-height:8rem;resize:vertical}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.form-actions{display:flex;justify-content:flex-end;gap:.6rem;margin-top:1rem}.form-actions button{width:auto}.success-state{display:flex;align-items:center;gap:1rem;border:1px solid rgba(121,215,168,.22);background:rgba(121,215,168,.045);padding:1rem;border-radius:14px}.success-state>span{display:grid;place-items:center;width:2rem;height:2rem;border-radius:50%;background:rgba(121,215,168,.08);color:var(--success);font-weight:900}.success-state div{flex:1}.success-state p{margin:0}
.connector-grid{display:grid;gap:.7rem}.connector-card{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:1rem;border:1px solid var(--line);background:#151516;border-radius:15px;padding:1.15rem}.connector-logo{width:2.55rem;height:2.55rem;border-radius:11px;display:grid;place-items:center;font-weight:900;background:#222225}.gmail-logo{color:#efaba6}.shopify-logo{color:#addb92}.connector-copy p{color:var(--muted);font-size:.82rem;margin:.22rem 0}.connection-status{font-size:.73rem;color:var(--muted)}
.list{display:grid;gap:.7rem;margin-top:1rem}.list article,.review-card{border:1px solid var(--line);background:#151516;border-radius:14px;padding:1rem;display:grid;gap:.38rem}.list article span{color:var(--muted)}.review-actions{display:flex;gap:.55rem;margin-top:.45rem}.review-actions button{width:auto}.empty-state{display:grid;place-items:center;text-align:center;padding:4rem 1rem;border:1px dashed #353538;border-radius:var(--radius);background:#131314}.empty-state p{max-width:34rem;color:var(--muted)}.empty-icon{display:grid;place-items:center;width:2.8rem;height:2.8rem;border-radius:50%;background:#202023;color:#c5c0ff;font-size:1.15rem;margin-bottom:.7rem}
.automation-card{max-width:760px}.mode-picker{border:0;padding:0;margin:0;display:grid;gap:.62rem}.mode-picker legend{font-weight:760;margin-bottom:.6rem}.mode-option{display:flex;gap:.8rem;align-items:flex-start;padding:.95rem;border:1px solid var(--line);border-radius:13px;background:#121213;cursor:pointer}.mode-option:has(input:checked){border-color:#5c567d;background:#18171f}.mode-option input{accent-color:#9b91ff;margin-top:.18rem}.mode-option strong,.mode-option small{display:block}.mode-option small{margin-top:.12rem}.advanced-card{margin:1rem 0;border:1px solid var(--line);border-radius:13px;background:#121213}.advanced-card summary{cursor:pointer;padding:.86rem .95rem;font-weight:700;color:var(--muted)}.advanced-body{display:grid;grid-template-columns:1fr 1fr;gap:1rem;padding:0 .95rem .95rem}.advanced-body small{font-weight:400}.safety-note{display:flex;gap:.65rem;align-items:flex-start;padding:.85rem;border-radius:12px;background:rgba(121,215,168,.04);border:1px solid rgba(121,215,168,.16);margin:1rem 0}.safety-note span{color:var(--success);font-weight:900}.safety-note p{margin:0;color:var(--muted)}.safety-note strong{color:var(--ink)}
.automation-mode-explainer{display:grid;gap:.4rem;padding:.9rem .95rem;margin:.8rem 0;border:1px solid var(--line);border-radius:12px;background:#121213}.automation-mode-explainer p{margin:0;font-size:.8rem;color:var(--muted);line-height:1.5}.automation-mode-explainer strong{color:var(--ink)}
.settings-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.7rem}.settings-card{border:1px solid var(--line);background:#151516;border-radius:14px;padding:1.05rem}.settings-card p{color:var(--muted);margin-bottom:.6rem}.settings-icon{display:grid;place-items:center;width:1.9rem;height:1.9rem;border-radius:9px;background:#222225;color:#c0bbff;margin-bottom:.75rem}.tag{display:inline-block;font-size:.68rem;padding:.28rem .48rem;border-radius:999px;border:1px solid var(--line);color:var(--muted)}.tag.success{color:var(--success);border-color:rgba(121,215,168,.2);background:rgba(121,215,168,.04)}.danger{background:transparent;color:var(--danger);border-color:#5c363a}.subtle-danger{margin-top:.8rem}

/* Command palette: a fast, keyboard-first way to move through the workspace. */
.command-overlay{position:fixed;inset:0;z-index:100;display:grid;place-items:start center;padding-top:min(18vh,160px)}.command-backdrop{position:absolute;inset:0;border:0;background:rgba(0,0,0,.56);backdrop-filter:blur(4px)}.command-palette{position:relative;width:min(92vw,590px);border:1px solid #37373a;background:#19191b;border-radius:17px;box-shadow:0 30px 100px rgba(0,0,0,.55);overflow:hidden}.command-search-row{display:flex;align-items:center;gap:.65rem;padding:.75rem .85rem;border-bottom:1px solid var(--line)}.command-search-row input{flex:1;border:0;background:transparent;color:var(--ink);outline:0;padding:.35rem 0}.command-search-row kbd{font-size:.62rem;color:#777671;border:1px solid #39393c;padding:.18rem .34rem;border-radius:5px}.command-label{font-size:.66rem;text-transform:uppercase;letter-spacing:.09em;color:#706f6b;font-weight:800;margin:.75rem .85rem .35rem}.command-results{display:grid;padding:0 .45rem .5rem}.command-results button{display:grid;grid-template-columns:1.5rem 1fr;gap:.65rem;align-items:center;text-align:left;border:0;background:transparent;color:var(--ink);border-radius:10px;padding:.68rem .72rem}.command-results button:hover,.command-results button.command-focus{background:#242427}.command-results button>span:last-child{display:grid}.command-results strong{font-size:.84rem}.command-results small{font-size:.68rem}.command-results button.filtered-out{display:none}

@media(max-width:900px){
  .shell{grid-template-columns:1fr}.sidebar{position:fixed;z-index:80;left:0;top:0;width:230px;transform:translateX(-102%);transition:transform .18s ease;box-shadow:30px 0 60px rgba(0,0,0,.35)}.shell.mobile-nav-open .sidebar{transform:translateX(0)}.sidebar-collapse{display:none}.mobile-menu{display:grid}.content{padding:0 1rem 3rem}.attention-row,.settings-grid{grid-template-columns:1fr}.topbar{height:62px}.home-stage{padding-top:3rem}.account-copy,.nav-copy,.logout-btn{display:initial!important}.connector-card{grid-template-columns:auto 1fr}.connector-card>button{grid-column:1/-1;width:100%}
}
@media(max-width:640px){
  .auth{padding:1rem}.auth-card{padding:1.4rem}.home-hero h2{font-size:2.05rem}.home-stage{padding-top:2.2rem}.quick-actions{justify-content:flex-start;overflow:auto;flex-wrap:nowrap;padding-bottom:.2rem}.quick-actions button{white-space:nowrap}.attention-row{grid-template-columns:1fr}.form-grid,.advanced-body{grid-template-columns:1fr}.section-heading{flex-direction:column}.section-heading>.primary{width:100%}.review-actions{flex-direction:column}.review-actions button{width:100%}.health-pill span:last-child{display:none}.content{padding:0 .8rem 2rem}
}

/* V3.8 mission center — persistent AI work, no developer-console vocabulary. */
.panel-wide{width:min(100%,1520px);margin:0 auto;padding-top:2.2rem}
.mission-layout{display:grid;grid-template-columns:minmax(260px,.6fr) minmax(420px,1.4fr);gap:.85rem;align-items:start}
/* The list used to scroll in its own capped-height box while the page could
   also scroll around it - two scrollbars fighting for the same gesture. The
   list now grows with the page; only the detail pane stays put (sticky). */
.mission-list{display:grid;gap:.48rem;padding-right:.15rem}
.mission-row{width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.8rem;align-items:center;text-align:left;border:1px solid var(--line);background:#141415;color:var(--ink);border-radius:14px;padding:.88rem .92rem;transition:border-color .15s,background .15s,transform .1s}
.mission-row:hover{background:#19191b;border-color:#3a3a3e}.mission-row:active{transform:translateY(1px)}.mission-row.selected{border-color:#575171;background:#191820}
.mission-row-main,.mission-row-side{display:grid;gap:.18rem;min-width:0}.mission-row-main strong{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.86rem}.mission-row-main small{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.68rem}.mission-row-side{text-align:right;justify-items:end}
.mission-detail{position:sticky;top:82px;min-height:360px;border:1px solid var(--line);background:#141415;border-radius:16px;padding:1.15rem;box-shadow:0 14px 50px rgba(0,0,0,.12)}
.mission-detail-head{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start}.mission-detail-head h3{font-size:1.16rem;line-height:1.35;margin:.28rem 0 .15rem;max-width:42rem}.mission-kind{font-size:.67rem;text-transform:uppercase;letter-spacing:.08em;color:#8f8e89;font-weight:800}
.mission-status{display:inline-flex;align-items:center;width:max-content;border:1px solid var(--line);border-radius:999px;padding:.22rem .48rem;font-size:.65rem;color:var(--muted);white-space:nowrap}.mission-status.running{color:#d9d4ff;border-color:rgba(143,131,255,.3);background:rgba(143,131,255,.06)}.mission-status.completed{color:var(--success);border-color:rgba(121,215,168,.22);background:rgba(121,215,168,.04)}.mission-status.failed{color:var(--warning);border-color:rgba(232,191,114,.25);background:rgba(232,191,114,.04)}
.mission-meta{display:flex;gap:.7rem;flex-wrap:wrap;color:var(--muted-2);font-size:.68rem;margin:.9rem 0 .5rem}.mission-progress{display:block;width:100%;height:4px;border:0;border-radius:999px;overflow:hidden;appearance:none;-webkit-appearance:none;background:#252528;color:#bdb7ff}.mission-progress::-webkit-progress-bar{background:#252528}.mission-progress::-webkit-progress-value{background:#bdb7ff;border-radius:999px;transition:width .35s ease}.mission-progress::-moz-progress-bar{background:#bdb7ff;border-radius:999px}
.mission-final,.mission-attention,.mission-working{margin:1rem 0;border-radius:13px;padding:.92rem;border:1px solid var(--line);background:#111112}.mission-final{border-color:rgba(121,215,168,.18);background:rgba(121,215,168,.025)}.mission-final>span{display:block;color:var(--success);font-size:.68rem;font-weight:800;text-transform:uppercase;letter-spacing:.07em;margin-bottom:.35rem}.mission-final p,.mission-attention p,.mission-working p{margin:0;color:#d8d7d3}.mission-attention{border-color:rgba(232,191,114,.2);background:rgba(232,191,114,.03)}.mission-attention strong{display:block;color:var(--warning);margin-bottom:.25rem}.mission-working{display:flex;align-items:center;gap:.6rem}.working-dot{width:.55rem;height:.55rem;border-radius:50%;background:#bdb7ff;box-shadow:0 0 0 0 rgba(189,183,255,.35);animation:missionPulse 1.7s infinite}@keyframes missionPulse{70%{box-shadow:0 0 0 8px rgba(189,183,255,0)}100%{box-shadow:0 0 0 0 rgba(189,183,255,0)}}
.agent-results{display:grid;gap:.5rem;margin:1rem 0}.agent-result{border-top:1px solid var(--line-soft);padding:.72rem .1rem 0}.agent-result:first-child{border-top:0}.agent-result .agent-name{text-transform:capitalize;font-size:.7rem;font-weight:800;color:#aaa5e8}.agent-result p{margin:.25rem 0 .08rem;color:#c8c7c3;font-size:.82rem}.agent-result small{font-size:.67rem}.empty-state.compact{padding:2.8rem 1rem;min-height:300px}

/* Background health failures should not dominate the whole workspace. Red is
   reserved for actions the user explicitly attempted. */
.toast.error{border-color:#4f3235;background:#211719;color:#f0cfd2;font-size:.82rem}

/* Collapse to a single column early enough that a laptop / tablet near
   1024px never has to scroll the page sideways (V4.3.0-beta.2 visual pass). */
@media(max-width:1120px){.mission-layout{grid-template-columns:1fr}.mission-list{max-height:none}.mission-detail{position:static}.panel-wide{padding-top:1.5rem}}

/* V3.8.1 commercial stabilization: visible recovery confirmation and plan comparison. */
.auth-result{border:1px solid rgba(121,215,168,.22);background:rgba(121,215,168,.04);color:#d7e8df;border-radius:12px;padding:.78rem .86rem;font-size:.82rem}
.plans-section{margin-top:1.2rem}.plan-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.7rem}.plan-card{border:1px solid var(--line);background:#151516;border-radius:14px;padding:1rem}.plan-card.current{border-color:#5c567d;background:#18171f}.plan-card h4{font-size:1.05rem;margin:.55rem 0 .18rem}.plan-card p{color:var(--muted);font-size:.78rem}.plan-card ul{list-style:none;padding:0;margin:.8rem 0 0;display:grid;gap:.42rem}.plan-card li{display:flex;justify-content:space-between;gap:.7rem;padding-top:.42rem;border-top:1px solid var(--line-soft);font-size:.75rem}.plan-card li span{color:var(--muted)}.plan-badge{display:inline-block;border:1px solid var(--line);border-radius:999px;padding:.22rem .42rem;color:var(--muted);font-size:.64rem}.plan-badge.current{color:var(--success);border-color:rgba(121,215,168,.22);background:rgba(121,215,168,.04)}.plan-loading{color:var(--muted);padding:.9rem;border:1px dashed var(--line);border-radius:12px}
@media(max-width:900px){.plan-grid{grid-template-columns:1fr}}
.plan-price{font-size:1.22rem;font-weight:750;margin:.45rem 0 .1rem}.plan-card .plan-upgrade{width:100%;margin-top:.85rem}.diagnostics-result{display:grid;gap:.45rem;margin-top:.65rem}.diagnostic-row{display:flex;justify-content:space-between;gap:1rem;padding:.65rem .75rem;border:1px solid var(--line-soft);border-radius:10px;background:#131314;font-size:.76rem}.diagnostic-row span{text-transform:capitalize;color:var(--muted)}.diagnostic-row strong{text-align:right;font-weight:600}

/* V3.8.2 live stabilization */
.diagnostic-actions { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.diagnostic-cost-note { margin-top:10px; font-size:12px; }

.plan-price small { display:block; margin-top:3px; font-size:11px; font-weight:500; opacity:.65; }

/* V3.8.3 premium onboarding */
.toast.success{border-color:rgba(121,215,168,.24);background:#132019;color:#d8f6e5;font-size:.82rem}
.onboarding-shell{max-width:760px;margin:2.25rem auto 0;padding:0 1rem}
.onboarding-progress{display:flex;align-items:center;justify-content:center;gap:.62rem;margin:0 auto 2.2rem;color:var(--muted-2);font-size:.69rem;font-weight:700}
.onboarding-step{display:flex;align-items:center;gap:.42rem;white-space:nowrap}.onboarding-step b{width:1.45rem;height:1.45rem;border-radius:50%;display:grid;place-items:center;border:1px solid var(--line);font-size:.62rem;background:#121213}.onboarding-step.active{color:#e8e6ff}.onboarding-step.active b{border-color:#6d6596;background:#211f2d;color:#dcd8ff}.onboarding-line{width:42px;height:1px;background:var(--line)}
.onboarding-copy{text-align:center;margin:0 auto 1.35rem;max-width:620px}.onboarding-copy .soft-badge{margin-bottom:.85rem}.onboarding-copy h2{font-size:2rem;letter-spacing:-.04em;margin:.1rem 0 .55rem}.onboarding-copy p{color:var(--muted);font-size:.92rem;line-height:1.55;margin:0 auto;max-width:580px}
.onboarding-card{max-width:620px;margin:0 auto;border:1px solid #343438;background:linear-gradient(180deg,#171719 0%,#141415 100%);border-radius:18px;padding:1.35rem;box-shadow:0 18px 50px rgba(0,0,0,.18)}
.onboarding-card>label{display:block;font-size:.76rem;font-weight:760;margin-bottom:.48rem;color:#f0efeb}.onboarding-card>input{width:100%;height:50px;border-radius:12px;border:1px solid #3b3b41;background:#101011;color:var(--ink);padding:0 .9rem;font-size:.92rem;outline:none;transition:border-color .16s ease,box-shadow .16s ease,background .16s ease}.onboarding-card>input:focus{border-color:#746ca3;box-shadow:0 0 0 3px rgba(139,129,199,.10);background:#121214}.onboarding-card>input[readonly]{opacity:.82}
.field-assist{color:var(--muted-2);font-size:.71rem;line-height:1.45;margin:.48rem 0 1rem}.onboarding-primary{width:100%;height:48px;border-radius:12px;font-size:.86rem;position:relative}.onboarding-primary.busy span:after{content:"";display:inline-block;width:.78rem;height:.78rem;margin-left:.55rem;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;vertical-align:-.12rem;animation:premiumSpin .75s linear infinite}@keyframes premiumSpin{to{transform:rotate(360deg)}}
.onboarding-inline-status{margin:.1rem 0 .85rem;padding:.72rem .8rem;border-radius:11px;font-size:.75rem;line-height:1.45;border:1px solid var(--line);background:#111112;color:var(--muted)}.onboarding-inline-status.error{border-color:#513438;background:#211719;color:#f0cfd2}.onboarding-inline-status.success{border-color:rgba(121,215,168,.22);background:rgba(121,215,168,.045);color:#ccefdc}.onboarding-inline-status.working{border-color:#45415c;background:#17161d;color:#ddd9ff}
.onboarding-safe-note{display:flex;justify-content:center;align-items:center;gap:.4rem;color:var(--muted-2);font-size:.68rem;margin:.85rem 0 0}.onboarding-safe-note span{color:var(--success)}
.onboarding-next{max-width:620px;margin:1rem auto 0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.5rem}.onboarding-next>span{display:flex;gap:.55rem;padding:.72rem;border:1px solid var(--line-soft);border-radius:12px;background:rgba(255,255,255,.012)}.onboarding-next>b{}.onboarding-next>span>b{width:1.35rem;height:1.35rem;flex:0 0 auto;border-radius:50%;display:grid;place-items:center;background:#202023;color:#bdb7ff;font-size:.62rem}.onboarding-next strong,.onboarding-next small{display:block}.onboarding-next strong{font-size:.7rem}.onboarding-next small{color:var(--muted-2);font-size:.63rem;margin-top:.12rem;line-height:1.35}
.onboarding-success{max-width:620px;margin:1rem auto 0;box-shadow:0 12px 30px rgba(0,0,0,.12)}
.onboarding-locked #nav button[data-panel]:not([data-panel="onboarding"]){opacity:.42;cursor:not-allowed;position:relative}.onboarding-locked #nav button[data-panel]:not([data-panel="onboarding"]) .nav-copy:after{content:" · after setup";font-size:.62rem;color:var(--muted-2);font-weight:500}.onboarding-locked .new-action{opacity:.42}
.sidebar-account.setup-pending{cursor:default}.sidebar-account.setup-pending .account-avatar{background:#202023;color:#bdb7ff}.sidebar-account.setup-pending small{color:var(--muted-2)}
body.workspace-transition .content{pointer-events:none}.workspace-transition #panel-onboarding{opacity:.88}
@media(max-width:720px){.onboarding-shell{margin-top:1.3rem;padding:0}.onboarding-copy h2{font-size:1.65rem}.onboarding-next{grid-template-columns:1fr}.onboarding-progress span>span{display:none}.onboarding-line{width:30px}}

/* V3.9.1 premium mission depth + decision-first results */
.mission-mode-shell{display:grid;justify-items:center;gap:.45rem;margin-top:.7rem}.mission-mode-picker{display:flex;flex-wrap:wrap;justify-content:center;gap:.4rem}.mission-mode-chip{cursor:pointer}.mission-mode-chip input{position:absolute;opacity:0;pointer-events:none}.mission-mode-chip span{display:inline-flex;align-items:center;border:1px solid var(--line);border-radius:999px;padding:.42rem .68rem;background:#121213;color:var(--muted);font-size:.72rem;transition:.15s}.mission-mode-chip input:checked+span{color:#fff;border-color:#655d89;background:#1b1923;box-shadow:0 0 0 2px rgba(155,145,255,.06)}.mission-mode-chip:hover span{color:#fff;background:#18181a}.mission-estimate{margin:0;color:var(--muted-2);font-size:.68rem;min-height:1rem}.mission-estimate.ready{color:#c7c2ff}.mission-estimate.preview{color:#a9a8a3}
.connector-inline-form{margin-top:.8rem;border:1px solid var(--line);border-radius:14px;background:#121213;padding:1rem}.connector-inline-form label{display:block;font-weight:750;margin-bottom:.55rem}.connector-domain-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.6rem}.connector-notice{margin-top:.8rem;border:1px solid rgba(155,145,255,.18);background:rgba(155,145,255,.04);border-radius:13px;padding:.85rem;color:#d8d6e4}.connector-notice strong{display:block;color:#fff;margin-bottom:.2rem}.connector-notice p{margin:0;color:var(--muted)}
.mission-summary-card{margin:1rem 0;border:1px solid rgba(143,131,255,.18);background:linear-gradient(180deg,rgba(143,131,255,.035),rgba(143,131,255,.015));border-radius:15px;padding:1rem}.mission-summary-card>span{display:block;color:var(--accent);font-size:.68rem;font-weight:850;text-transform:uppercase;letter-spacing:.07em}.mission-summary-card h4{font-size:1.08rem;line-height:1.45;margin:.42rem 0 0}.result-stat-row{display:flex;flex-wrap:wrap;gap:.42rem;margin:.7rem 0 1rem}.result-stat{border:1px solid var(--line);border-radius:999px;padding:.28rem .5rem;font-size:.66rem;color:var(--muted)}.result-section{border-top:1px solid var(--line);padding:1rem 0}.result-section:first-of-type{border-top:0}.result-section h4{font-size:.78rem;margin:0 0 .65rem;color:#fff}.result-actions{display:grid;gap:.5rem;counter-reset:action}.result-action{display:grid;grid-template-columns:auto 1fr;gap:.65rem;align-items:start;padding:.7rem .75rem;border:1px solid var(--line);border-radius:12px;background:#111112;color:#d8d7d3}.result-action:before{counter-increment:action;content:counter(action);width:1.45rem;height:1.45rem;display:grid;place-items:center;border-radius:50%;background:#201e2c;color:#c7c2ff;font-size:.68rem;font-weight:850}.opportunity-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:.55rem}.opportunity-card{border:1px solid var(--line);border-radius:12px;background:#111112;padding:.75rem}.opportunity-card strong{display:block;margin-bottom:.3rem}.opportunity-card p,.opportunity-card small{margin:0;color:var(--muted);line-height:1.45}.risk-list,.evidence-list{display:grid;gap:.4rem}.risk-item,.evidence-item{padding:.62rem .7rem;border-radius:10px;background:#111112;color:#d6d5d1;border:1px solid #242427}.evidence-item small{display:block;color:var(--muted);margin-top:.2rem}.source-list{display:grid;gap:.4rem}.source-list a{color:#c7c2ff;text-decoration:none;overflow-wrap:anywhere}.source-list a:hover{text-decoration:underline}.agent-details{margin-top:1rem;border-top:1px solid var(--line);padding-top:.8rem}.agent-details summary{cursor:pointer;color:var(--muted);font-weight:750}.agent-details[open] summary{color:#fff;margin-bottom:.5rem}.mission-mode-banner{border:1px solid rgba(232,191,114,.18);background:rgba(232,191,114,.03);border-radius:11px;padding:.65rem .75rem;margin:.65rem 0;color:#d9cda9;font-size:.72rem}
@media(max-width:700px){.connector-domain-row{grid-template-columns:1fr}.mission-mode-picker{justify-content:flex-start}.mission-mode-shell{justify-items:start}.opportunity-grid{grid-template-columns:1fr}}
.diagnostic-group{display:grid;gap:.45rem;margin-top:.8rem}.diagnostic-group h4{margin:0 0 .1rem;font-size:.78rem;color:var(--text);letter-spacing:.01em}.diagnostic-summary{display:flex;flex-direction:column;gap:.2rem;padding:.78rem .85rem;border-radius:12px;border:1px solid var(--line-soft);background:#131314}.diagnostic-summary strong{font-size:.82rem}.diagnostic-summary span{font-size:.76rem;color:var(--muted)}.diagnostic-summary.ready{border-color:rgba(83,209,132,.28);background:rgba(38,96,61,.13)}.diagnostic-summary.attention{border-color:rgba(230,128,128,.28);background:rgba(112,44,44,.12)}.diagnostic-row.ready span{color:#9adbb1}.diagnostic-row.optional span{color:var(--muted)}.diagnostic-row.attention span{color:#f0aaaa}

/* V3.9.5 premium result reading layer */
.mission-summary-card{padding:1.15rem 1.2rem}.mission-summary-card h4{font-size:1.08rem;line-height:1.4;max-width:52rem}.summary-points{margin:.7rem 0 0;padding-left:1.1rem;color:#d7d6d2;display:grid;gap:.38rem}.summary-points li{line-height:1.5}.summary-more{margin-top:.65rem}.summary-more p{color:var(--muted);line-height:1.55}.section-heading{display:flex;align-items:baseline;justify-content:space-between;gap:1rem;margin-bottom:.7rem}.section-heading h4{margin:0!important}.section-heading span{font-size:.65rem;color:var(--muted-2);white-space:nowrap}.action-horizon{display:grid;grid-template-columns:7rem 1fr;gap:.8rem;align-items:start;margin:.6rem 0}.action-horizon-title{padding:.55rem 0;color:#c7c2ff;font-size:.68rem;font-weight:850;text-transform:uppercase;letter-spacing:.06em}.result-action{grid-template-columns:auto 1fr}.result-action:before{display:none}.action-number{width:1.45rem;height:1.45rem;display:grid;place-items:center;border-radius:50%;background:#201e2c;color:#c7c2ff;font-size:.68rem;font-weight:850}.result-more{margin-top:.55rem}.result-more>summary{cursor:pointer;color:var(--muted);font-size:.7rem;font-weight:750;list-style:none}.result-more>summary::-webkit-details-marker{display:none}.result-more>summary:before{content:'+';display:inline-grid;place-items:center;width:1.15rem;height:1.15rem;border:1px solid var(--line);border-radius:50%;margin-right:.4rem}.result-more[open]>summary:before{content:'−'}.result-more-body{margin-top:.55rem}.result-collapsible{padding:.85rem 0}.result-collapsible>summary{cursor:pointer;color:#fff;font-size:.78rem;font-weight:800}.risk-item,.evidence-item{line-height:1.5;padding:.72rem .8rem}.confidence-stat{border-color:rgba(232,191,114,.22);color:#ddd0aa}.mission-meta{align-items:center}.mission-meta span:last-child{font-weight:700;color:#d9d7ee}.agent-details{margin-top:1.15rem;padding-top:1rem}.agent-details summary{font-size:.72rem}.opportunity-card p{font-size:.82rem}.opportunity-card small{display:block;margin-top:.45rem;font-size:.68rem}.source-list{padding:.15rem 0}.source-list a,.source-list span{padding:.45rem .55rem;border:1px solid var(--line);border-radius:9px;background:#111112}
@media(max-width:760px){.action-horizon{grid-template-columns:1fr;gap:.2rem}.action-horizon-title{padding:.3rem 0}.section-heading{align-items:flex-start;flex-direction:column;gap:.2rem}.section-heading span{white-space:normal}}

/* V3.9.9 autonomous operations */
.autopilot-card,.automation-rules-card{border:1px solid var(--line);border-radius:18px;background:var(--panel);padding:18px;margin-top:18px}
.autopilot-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:14px}
.autopilot-metrics>div{padding:14px;border:1px solid var(--line);border-radius:14px;background:var(--panel-soft)}
.autopilot-metrics strong{display:block;font-size:1.55rem;line-height:1.1;margin-bottom:5px}
.autopilot-metrics span{font-size:.78rem;color:var(--muted)}
.autopilot-recent{display:grid;gap:8px;margin-top:12px}
.autopilot-event{display:flex;gap:10px;align-items:flex-start;padding:10px 0;border-top:1px solid var(--line)}
.autopilot-event:first-child{border-top:0}.autopilot-event span:last-child{display:grid;gap:2px}.autopilot-event small{color:var(--muted)}
.autonomy-rules{display:grid;gap:10px}.autonomy-rule{display:flex;justify-content:space-between;gap:18px;align-items:center;border:1px solid var(--line);border-radius:14px;padding:14px;background:var(--panel-soft)}
.autonomy-rule p{margin:4px 0;color:var(--muted);max-width:620px}.autonomy-rule small{color:var(--muted)}.autonomy-rule.paused{opacity:.72}.autonomy-rule.unavailable{border-style:dashed;opacity:.85}.autonomy-badge{display:inline-block;margin-left:8px;padding:1px 9px;border-radius:999px;font-size:.74rem;background:rgba(245,184,74,.16);color:#f5b84a;vertical-align:middle}.autonomy-unavailable{color:#f5b84a!important}
.autonomy-rule-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}.switch-label{display:flex;align-items:center;gap:7px;font-size:.82rem}.switch-label input{accent-color:currentColor}.compact-button{padding:8px 11px!important;min-height:auto!important}
@media(max-width:900px){.autopilot-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.autonomy-rule{align-items:flex-start;flex-direction:column}.autonomy-rule-actions{justify-content:flex-start}}

/* V4.0 decision-first UX */
.connector-trust{display:block;margin-top:.35rem;color:var(--muted-2);font-size:.66rem;line-height:1.35}
.decision-card{border:1px solid var(--line);border-radius:18px;background:linear-gradient(180deg,#151516,#111112);padding:1.05rem 1.1rem;margin-bottom:.85rem;box-shadow:0 12px 34px rgba(0,0,0,.10)}
.decision-card h3{margin:.55rem 0 .85rem;font-size:1.02rem;line-height:1.35;color:#fff}
.decision-topline{display:flex;align-items:center;justify-content:space-between;gap:.7rem}.decision-topline small{color:var(--muted-2);font-size:.68rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:55%}
.decision-category-tag{font-size:.65rem;font-weight:700;color:var(--muted-2);border:1px solid var(--line);border-radius:999px;padding:.18rem .55rem;white-space:nowrap}
.decision-meta-row{display:flex;gap:.9rem;flex-wrap:wrap;margin:.4rem 0 0;font-size:.7rem;color:var(--muted-2)}
.decision-filters{display:flex;gap:.6rem;flex-wrap:wrap;margin:.8rem 0}.decision-filters input[type=search]{flex:1;min-width:200px;height:38px;border-radius:10px;border:1px solid var(--line);background:#121213;color:var(--ink);padding:0 .75rem}.decision-filters select{height:38px;border-radius:10px;border:1px solid var(--line);background:#121213;color:var(--ink);padding:0 .6rem}
.decision-list-footer{display:flex;align-items:center;justify-content:space-between;gap:.8rem;margin-top:.8rem}
.decision-badge{display:inline-flex;align-items:center;min-height:1.55rem;padding:.24rem .5rem;border-radius:999px;border:1px solid rgba(155,145,255,.2);background:rgba(155,145,255,.06);color:#d2ceff;font-size:.65rem;font-weight:850;letter-spacing:.02em}
.decision-notice .decision-badge{border-color:rgba(232,191,114,.22);background:rgba(232,191,114,.06);color:#e7d4a7}
.decision-summary,.decision-why,.decision-recommendation,.decision-draft{border-top:1px solid var(--line-soft);padding:.72rem 0}.decision-summary>span,.decision-why>span,.decision-recommendation>span,.decision-draft>span{display:block;margin-bottom:.26rem;color:var(--muted-2);font-size:.62rem;font-weight:850;text-transform:uppercase;letter-spacing:.065em}
.decision-summary p,.decision-why p,.decision-draft p{margin:0;color:#d8d7d3;font-size:.82rem;line-height:1.5}.decision-why p{color:var(--muted)}.decision-recommendation strong{display:block;color:#fff;font-size:.84rem;line-height:1.45}
.decision-draft{margin-top:.1rem}.decision-draft p{max-height:11rem;overflow:auto;padding:.75rem;border:1px solid var(--line);border-radius:11px;background:#0e0e0f;white-space:pre-wrap}
.decision-actions{display:flex;gap:.55rem;align-items:center;margin-top:.8rem;flex-wrap:wrap}.decision-actions .primary{min-width:9rem}.decision-original{margin-top:.75rem;border-top:1px solid var(--line-soft);padding-top:.65rem}.decision-original summary{cursor:pointer;color:var(--muted);font-size:.69rem;font-weight:750;list-style:none}.decision-original summary::-webkit-details-marker{display:none}.decision-original summary:before{content:'+';display:inline-grid;place-items:center;width:1.15rem;height:1.15rem;border:1px solid var(--line);border-radius:50%;margin-right:.42rem}.decision-original[open] summary:before{content:'−'}.decision-original-body{margin-top:.55rem;padding:.75rem;border:1px solid var(--line);border-radius:11px;background:#0e0e0f;color:var(--muted);font-size:.75rem;line-height:1.5;white-space:pre-wrap;max-height:16rem;overflow:auto;overflow-wrap:anywhere}
@media(max-width:700px){.decision-card{padding:.9rem}.decision-topline{align-items:flex-start;flex-direction:column}.decision-topline small{max-width:100%;white-space:normal}.decision-actions{display:grid;grid-template-columns:1fr}.decision-actions button{width:100%}}
.shopify-panel{margin-top:1.1rem;padding:1rem;border:1px solid var(--line);border-radius:14px;background:#141416}
.shopify-panel-head{display:flex;align-items:center;justify-content:space-between;gap:.75rem;flex-wrap:wrap}
.shopify-panel-head h3{margin:0;font-size:.95rem}
.shopify-state{font-size:.7rem;font-weight:800;letter-spacing:.03em;text-transform:uppercase;padding:.3rem .55rem;border-radius:999px;border:1px solid var(--line);color:var(--muted);background:#1b1b1d}
.shopify-state[data-tone="ok"]{color:#8fe3b4;border-color:rgba(121,215,168,.42);background:rgba(121,215,168,.10)}
.shopify-state[data-tone="busy"]{color:#c9c4ff;border-color:rgba(155,145,255,.42);background:rgba(155,145,255,.10)}
.shopify-state[data-tone="warn"]{color:#f0c98a;border-color:rgba(240,201,138,.42);background:rgba(240,201,138,.10)}
.shopify-state[data-tone="bad"]{color:#f2a2a2;border-color:rgba(242,162,162,.42);background:rgba(242,162,162,.10)}
.shopify-panel-message{margin:.6rem 0 0;color:var(--muted);font-size:.8rem;line-height:1.5}
.shopify-facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(11rem,1fr));gap:.7rem;margin:.95rem 0 0}
.shopify-facts div{min-width:0}
.shopify-facts dt{font-size:.67rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:var(--muted-2)}
.shopify-facts dd{margin:.2rem 0 0;font-size:.82rem;color:#e7e6e2;overflow-wrap:anywhere}
.shopify-readonly-note{margin:.95rem 0 0;padding:.55rem .7rem;border:1px solid rgba(121,215,168,.24);border-radius:10px;background:rgba(121,215,168,.06);color:#a9d9c0;font-size:.75rem;line-height:1.45}
.shopify-actions{display:flex;gap:.55rem;flex-wrap:wrap;margin-top:.95rem}
.shopify-actions button:disabled{opacity:.55;cursor:not-allowed}
.shopify-action-help{margin:.55rem 0 0;color:var(--muted-2);font-size:.74rem;line-height:1.45}
.shopify-runs{margin-top:.9rem;border-top:1px solid var(--line-soft);padding-top:.65rem}
.shopify-runs summary{cursor:pointer;color:var(--muted);font-size:.72rem;font-weight:750}
.shopify-runs ul{list-style:none;margin:.6rem 0 0;padding:0;display:grid;gap:.4rem}
.shopify-runs li{font-size:.74rem;color:var(--muted);border:1px solid var(--line-soft);border-radius:9px;padding:.45rem .6rem}
.shopify-runs li strong{color:#e7e6e2;font-weight:750}
.shopify-panel :focus-visible{outline:2px solid #9b91ff;outline-offset:2px}
@media(max-width:700px){.shopify-actions{display:grid;grid-template-columns:1fr}.shopify-actions button{width:100%}.shopify-panel-head{align-items:flex-start;flex-direction:column}}

/* V4.3.0-beta.2 — honest mission result quality + Knowledge management */
.mission-status.insufficient{color:var(--warning);border-color:rgba(232,191,114,.3);background:rgba(232,191,114,.06)}
.mission-insufficient{margin:1rem 0;border-radius:13px;padding:1rem 1.1rem;border:1px solid rgba(232,191,114,.28);background:rgba(232,191,114,.045)}
.mission-insufficient>span{display:block;color:var(--warning);font-size:.66rem;font-weight:850;text-transform:uppercase;letter-spacing:.07em;margin-bottom:.35rem}
.mission-insufficient h4{font-size:1rem;line-height:1.4;margin:0 0 .6rem;max-width:52rem}
.mission-insufficient .missing-block{margin:.5rem 0}.mission-insufficient .missing-block strong,.mission-insufficient .next-action strong{display:block;font-size:.72rem;text-transform:uppercase;letter-spacing:.05em;color:var(--muted-2);margin-bottom:.25rem}
.mission-insufficient .missing-block ul{margin:0;padding-left:1.1rem;display:grid;gap:.3rem;color:#d8d7d3}
.mission-insufficient .next-action{margin:.55rem 0 0;color:#d8d7d3;font-size:.84rem;line-height:1.5}
.mission-insufficient .result-more{margin-top:.7rem}
.analyzed-empty{margin:.2rem 0 0;font-size:.8rem}
.knowledge-item{border:1px solid var(--line);background:#151516;border-radius:14px;padding:1rem;display:grid;gap:.4rem}
.knowledge-item .k-q{font-weight:750;color:#fff}
.knowledge-item .k-a{color:var(--muted);font-size:.85rem;line-height:1.5;white-space:pre-wrap;overflow-wrap:anywhere}
.knowledge-item .k-meta{display:flex;flex-wrap:wrap;gap:.5rem;font-size:.68rem;color:var(--muted-2)}
.knowledge-item .k-meta .tag{font-size:.64rem}
.knowledge-item .k-actions{display:flex;gap:.5rem;flex-wrap:wrap;margin-top:.15rem}
.knowledge-item .k-actions button{width:auto;padding:.5rem .8rem}
@media(max-width:640px){.knowledge-item .k-actions{display:grid;grid-template-columns:1fr}.knowledge-item .k-actions button{width:100%}}

.gmail-disclosure{margin-top:.8rem;border:1px solid rgba(155,145,255,.28);background:rgba(155,145,255,.05);border-radius:14px;padding:1.1rem}
.gmail-disclosure h3{margin:0 0 .3rem}
.gmail-disclosure-list{margin:.6rem 0;padding-left:1.1rem;display:grid;gap:.5rem}
.gmail-disclosure-list li{color:var(--muted);font-size:.82rem;line-height:1.45}
.gmail-disclosure-list li strong{color:#fff}
.gmail-disclosure-list a{color:#c9c3ff}
.gmail-disclosure-actions{display:flex;gap:.6rem;justify-content:flex-end;margin-top:.6rem}
.gmail-disclosure-actions button{width:auto;padding:.55rem 1rem}
@media(max-width:640px){.gmail-disclosure-actions{display:grid;grid-template-columns:1fr}.gmail-disclosure-actions button{width:100%}}

/* ---- Mission team ------------------------------------------------------ */
/* Five specialists, five distinct identities. The accents are hues, not
   pictures: no portraits, no avatars, nothing that implies a human face. */
:root{
  --team-director:#8f83ff;
  --team-researcher:#6fc3e8;
  --team-strategist:#5fd0c5;
  --team-critic:#e8bf72;
  --team-verifier:#d8a0ff;
}
.team-office{border:1px solid var(--line);background:var(--surface);border-radius:var(--radius);padding:1.1rem 1.15rem;margin-bottom:1.1rem}
.team-office-head{display:flex;flex-wrap:wrap;gap:.6rem 1rem;align-items:baseline;justify-content:space-between;margin-bottom:.9rem}
.team-office-head h3{margin:0 0 .15rem;font-size:1.02rem}
.team-office-head p{margin:0;font-size:.8rem}
.team-rule{font-size:.72rem;font-weight:700;letter-spacing:.02em;color:var(--muted);border:1px solid var(--line);border-radius:999px;padding:.26rem .62rem;white-space:nowrap}
.team-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(148px,1fr));gap:.6rem}
.team-card{border:1px solid var(--line);border-top:2px solid var(--card-accent,var(--line));border-radius:12px;background:var(--bg);padding:.7rem .72rem;min-width:0}
.team-director{--card-accent:var(--team-director)}
.team-researcher{--card-accent:var(--team-researcher)}
.team-strategist{--card-accent:var(--team-strategist)}
.team-critic{--card-accent:var(--team-critic)}
.team-verifier{--card-accent:var(--team-verifier)}
.team-card-head{display:flex;align-items:center;justify-content:space-between;gap:.4rem;margin-bottom:.45rem}
.team-glyph{font-size:.95rem;line-height:1;color:var(--card-accent,var(--accent))}
.team-card-title{margin:0 0 .2rem;font-size:.82rem;font-weight:750;line-height:1.25}
.team-card-speciality{margin:0;font-size:.72rem;color:var(--muted);line-height:1.35}
.team-office-mission{margin:.25rem 0 0;font-size:.78rem;color:var(--ink);font-weight:650}
.team-card-contribution{margin:.42rem 0 0;font-size:.73rem;font-weight:650;color:var(--ink)}

/* State chips. Every one of these is derived from run data; there is no chip
   that means "probably working". */
.team-state{font-size:.65rem;font-weight:800;letter-spacing:.03em;text-transform:uppercase;border-radius:999px;padding:.2rem .48rem;border:1px solid transparent;white-space:nowrap}
.team-state-idle{color:var(--muted-2);border-color:var(--line)}
.team-state-ready{color:var(--accent);border-color:rgba(143,131,255,.42);background:rgba(143,131,255,.1)}
.team-state-active{color:var(--team-researcher);border-color:rgba(111,195,232,.45);background:rgba(111,195,232,.12)}
.team-state-done{color:var(--ink);border-color:var(--line);background:rgba(244,244,242,.06)}
.team-state-warn{color:var(--warning);border-color:rgba(232,191,114,.45);background:rgba(232,191,114,.12)}

/* ---- Team Decision ----------------------------------------------------- */
.team-decision{border:1px solid var(--line);border-radius:var(--radius);padding:.95rem 1rem;margin:.9rem 0}
.decision-verified{border-color:rgba(143,131,255,.42);background:rgba(143,131,255,.07)}
.decision-unsafe{border-color:rgba(232,191,114,.34);background:rgba(232,191,114,.05)}
.decision-warn{border-color:rgba(255,133,140,.34);background:rgba(255,133,140,.05)}
.decision-pending{border-color:var(--line)}
.decision-head{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;margin-bottom:.5rem}
.decision-seal{font-size:.68rem;font-weight:850;letter-spacing:.04em;text-transform:uppercase;border-radius:999px;padding:.26rem .6rem;border:1px solid}
.seal-verified{color:var(--accent-strong);border-color:rgba(143,131,255,.55);background:rgba(143,131,255,.14)}
.seal-unsafe{color:var(--warning);border-color:rgba(232,191,114,.5);background:rgba(232,191,114,.12)}
.seal-warn{color:var(--danger);border-color:rgba(255,133,140,.5);background:rgba(255,133,140,.12)}
.seal-pending{color:var(--muted);border-color:var(--line)}
.decision-by{font-size:.72rem;color:var(--muted)}
.decision-headline{margin:0 0 .6rem;font-size:.95rem;line-height:1.4;font-weight:700}
.decision-conclusion{margin:0 0 .6rem;font-size:.92rem;line-height:1.45}.decision-conclusion strong{color:var(--accent);margin-right:.25rem}.decision-conclusion span{color:var(--ink);font-weight:650}
.decision-figures{display:flex;flex-wrap:wrap;gap:.45rem}
.decision-figure{display:inline-flex;flex-direction:column;gap:.1rem;border:1px solid var(--line);border-radius:10px;padding:.34rem .55rem;font-size:.68rem;color:var(--muted)}
.decision-figure strong{font-size:.82rem;color:var(--ink);font-weight:800}
.decision-next{margin:.65rem 0 0;font-size:.79rem;color:var(--muted)}
.decision-next strong{color:var(--ink);margin-right:.3rem}

/* ---- Living Labyrinth --------------------------------------------------- */
/* The team's shared method, drawn from data only. A station with nothing in it
   stays visible and dimmed, so an empty part of the method is legible. */
.maze{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:.4rem;position:relative}
.maze-node{border:1px solid var(--line);border-radius:12px;padding:.6rem .55rem;display:flex;flex-direction:column;gap:.22rem;min-width:0;background:var(--bg)}
.maze-node.is-empty{opacity:.5}
.maze-node.is-filled{border-color:var(--node-accent,var(--line));box-shadow:inset 0 1px 0 var(--node-accent,transparent)}
.maze-director{--node-accent:var(--team-director)}
.maze-researcher{--node-accent:var(--team-researcher)}
.maze-strategist{--node-accent:var(--team-strategist)}
.maze-critic{--node-accent:var(--team-critic)}
.maze-verifier{--node-accent:var(--team-verifier)}
.maze-glyph{color:var(--node-accent,var(--muted));line-height:1;font-size:.9rem}
.maze-title{font-size:.74rem;font-weight:750}
.maze-detail{font-size:.71rem;color:var(--muted);overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical}

/* The team stays visually dominant on narrow screens: the Office reflows to a
   readable two-column grid before the Labyrinth collapses to a single column. */
@media(max-width:760px){.maze{grid-template-columns:1fr}.team-rule{white-space:normal}}
@media(max-width:480px){.team-grid{grid-template-columns:1fr}}

/* ---- Two readings of one mission --------------------------------------- */
.mission-tabs{display:flex;gap:.3rem;margin:.9rem 0 .2rem;border-bottom:1px solid var(--line)}
.mission-tab{background:none;border:0;border-bottom:2px solid transparent;color:var(--muted);font:inherit;font-size:.8rem;font-weight:700;padding:.5rem .7rem;cursor:pointer;min-height:auto}
.mission-tab:hover{color:var(--ink)}
.mission-tab[aria-selected="true"]{color:var(--ink);border-bottom-color:var(--accent-strong)}

/* ---- Mission team channels ---------------------------------------------- */
/* An operations desk, not a social thread: no bubbles facing each other, no
   send affordance, no read receipts, and nothing that suggests a person is
   typing to you. */
.team-view-head{display:flex;flex-wrap:wrap;gap:.4rem;margin:.85rem 0 .7rem}
.team-view-fact{border:1px solid var(--line);border-radius:999px;padding:.26rem .58rem;font-size:.7rem;color:var(--muted)}
.team-channels{display:grid;grid-template-columns:minmax(180px,.75fr) minmax(0,1.6fr);gap:.7rem;align-items:start}
.contact-list{display:flex;flex-direction:column;gap:.32rem;min-width:0}
.contact{display:grid;grid-template-columns:1.7rem minmax(0,1fr);gap:.55rem;align-items:start;text-align:left;background:var(--bg);border:1px solid var(--line);border-left:2px solid var(--contact-accent,var(--line));border-radius:11px;padding:.55rem .6rem;cursor:pointer;color:inherit;font:inherit;min-height:auto}
.contact:hover{border-color:var(--line-soft);background:#151516}
.contact.is-open{border-color:rgba(143,131,255,.5);background:rgba(143,131,255,.07)}
.contact-director{--contact-accent:var(--team-director)}
.contact-researcher{--contact-accent:var(--team-researcher)}
.contact-strategist{--contact-accent:var(--team-strategist)}
.contact-critic{--contact-accent:var(--team-critic)}
.contact-verifier{--contact-accent:var(--team-verifier)}
.contact-avatar{width:1.7rem;height:1.7rem;display:grid;place-items:center;border-radius:9px;background:#191920;color:var(--contact-accent,var(--accent));font-size:.85rem;line-height:1}
.contact-body{display:grid;gap:.22rem;min-width:0}
.contact-role{font-size:.79rem;font-weight:720;line-height:1.25}
.contact-state{justify-self:start}
.contact-hint{font-size:.71rem;color:var(--muted);overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}

.channel-pane{min-width:0}
.channel{border:1px solid var(--line);border-radius:13px;background:#131316;padding:.85rem .9rem;min-width:0}
.channel-head{display:grid;grid-template-columns:auto minmax(0,1fr);gap:.6rem;align-items:center;padding-bottom:.6rem;border-bottom:1px solid var(--line)}
.channel-back{display:none;grid-column:1/-1;justify-self:start;background:none;border:1px solid var(--line);border-radius:999px;color:var(--muted);font:inherit;font-size:.72rem;padding:.3rem .6rem;margin-bottom:.45rem;cursor:pointer;min-height:auto}
.channel-avatar{width:2rem;height:2rem;font-size:.95rem}
.channel-identity{display:grid;gap:.2rem;min-width:0}
.channel-role{font-size:.9rem;font-weight:760}
.channel-state{justify-self:start}
.channel-analysing{display:flex;align-items:center;gap:.5rem;margin:.7rem 0 0;font-size:.78rem;color:var(--accent)}
.analysing-dots{display:inline-flex;gap:.22rem}
.analysing-dots i{width:.32rem;height:.32rem;border-radius:50%;background:var(--accent-strong);opacity:.35;animation:channel-pulse 1.1s infinite ease-in-out}
.analysing-dots i:nth-child(2){animation-delay:.18s}
.analysing-dots i:nth-child(3){animation-delay:.36s}
@keyframes channel-pulse{0%,80%,100%{opacity:.3}40%{opacity:1}}
@media(prefers-reduced-motion:reduce){.analysing-dots i{animation:none;opacity:.75}}
.channel-objective{display:grid;gap:.14rem;margin:.75rem 0 0;font-size:.8rem;color:var(--ink);line-height:1.45}
.channel-objective span{font-size:.64rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--muted-2)}
.channel-reports{display:flex;flex-direction:column;gap:.5rem;margin-top:.8rem}
/* A slight, alternating inset keeps the reports from reading as one block
   without imitating opposing chat bubbles. */
.channel-report{border:1px solid var(--line);border-radius:12px;background:#161619;padding:.62rem .7rem;margin-right:1.1rem}
.channel-report:nth-child(even){margin-right:0;margin-left:1.1rem;background:#141418}
.channel-report-label{margin:0 0 .3rem;font-size:.66rem;font-weight:820;letter-spacing:.05em;text-transform:uppercase;color:var(--muted-2)}
.channel-text{margin:0;font-size:.8rem;line-height:1.5;color:#dcdbd7;overflow-wrap:anywhere}
.channel-list{margin:0;padding-left:1.05rem;display:grid;gap:.22rem;font-size:.79rem;line-height:1.45;color:#dcdbd7}
.channel-list li{overflow-wrap:anywhere}
.channel-empty{margin:.85rem 0 0;font-size:.8rem;color:var(--muted);line-height:1.5}
.channel-readonly{margin:.85rem 0 0;font-size:.66rem;color:var(--muted-2);letter-spacing:.03em}

@media(max-width:720px){
  .team-channels{grid-template-columns:1fr}
  .team-channels .channel-pane{display:none}
  .team-channels.is-channel-open .contact-list{display:none}
  .team-channels.is-channel-open .channel-pane{display:block}
  .team-channels.is-channel-open .channel-back{display:block}
}
@media(max-width:480px){
  .channel-report,.channel-report:nth-child(even){margin-left:0;margin-right:0}
  .contact{grid-template-columns:1.5rem minmax(0,1fr)}
}

/* ---- Discussions -------------------------------------------------------- */
/* Laboryn's own messaging: dark ground, indigo accents, geometric avatars.
   Deliberately not a social thread - no phone, no logo, no double tick, no
   green bubble, and no presence the data cannot support. */
.discussions{margin-top:1rem}
.dm-layout{display:grid;grid-template-columns:minmax(230px,.8fr) minmax(0,2fr);gap:.75rem;align-items:start}
.dm-contacts{display:flex;flex-direction:column;gap:.34rem;min-width:0}
.dm-contact{display:grid;grid-template-columns:1.8rem minmax(0,1fr);gap:.55rem;align-items:start;text-align:left;background:var(--surface);border:1px solid var(--line);border-left:2px solid var(--contact-accent,var(--line));border-radius:12px;padding:.6rem .65rem;cursor:pointer;color:inherit;font:inherit;min-height:auto}
.dm-contact:hover{background:#17171a}
.dm-contact.is-open{border-color:rgba(143,131,255,.5);background:rgba(143,131,255,.08)}
.dm-contact-body{display:grid;gap:.2rem;min-width:0}
.dm-contact-role{font-size:.82rem;font-weight:720}
.dm-contact-last{font-size:.73rem;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dm-activity{font-size:.7rem;font-weight:700}
.dm-replying{color:var(--accent)}
.dm-onmission{color:var(--team-researcher);overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}

.dm-thread{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:14px;background:#131316;min-width:0;min-height:460px}
.dm-thread-head{display:grid;grid-template-columns:auto minmax(0,1fr);gap:.6rem;align-items:center;padding:.75rem .85rem;border-bottom:1px solid var(--line)}
.dm-back{display:none;grid-column:1/-1;justify-self:start;background:none;border:1px solid var(--line);border-radius:999px;color:var(--muted);font:inherit;font-size:.72rem;padding:.3rem .6rem;margin-bottom:.4rem;cursor:pointer;min-height:auto}
.dm-thread-identity{display:grid;gap:.16rem;min-width:0}
.dm-thread-role{font-size:.92rem;font-weight:760}
.dm-thread-state{font-size:.73rem;min-height:1em}

.dm-messages{flex:1;overflow-y:auto;max-height:52vh;display:flex;flex-direction:column;gap:.5rem;padding:.85rem}
.dm-row{display:flex}
.dm-row-user{justify-content:flex-end}
.dm-row-agent{justify-content:flex-start}
.dm-bubble{max-width:min(82%,520px);border:1px solid var(--line);border-radius:14px;padding:.6rem .72rem;min-width:0}
/* The person's own words lean indigo; the specialist answers on the neutral
   surface. Neither side borrows another product's palette. */
.dm-mine{background:rgba(143,131,255,.12);border-color:rgba(143,131,255,.4);border-bottom-right-radius:5px}
.dm-theirs{background:#171719;border-bottom-left-radius:5px}
.dm-failed{background:rgba(255,133,140,.07);border-color:rgba(255,133,140,.35);border-bottom-left-radius:5px}
.dm-failed p{margin:0 0 .45rem;color:#f0cfd2;font-size:.8rem}
.dm-text{margin:0;font-size:.83rem;line-height:1.5;color:#dedcd8;white-space:pre-wrap;overflow-wrap:anywhere}
.dm-stamp{display:block;margin-top:.35rem;font-size:.64rem;color:var(--muted-2)}
.dm-empty{margin:auto;max-width:32ch;text-align:center;color:var(--muted);font-size:.8rem;line-height:1.55}
.dm-error{margin:0 .85rem;color:#f0cfd2;font-size:.76rem}

.dm-composer{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.5rem;align-items:end;padding:.7rem .85rem;border-top:1px solid var(--line)}
.dm-composer textarea{resize:vertical;min-height:2.6rem;max-height:8rem;font:inherit;font-size:.83rem;line-height:1.45;color:var(--ink);background:#101012;border:1px solid var(--line);border-radius:11px;padding:.55rem .65rem;width:100%}
.dm-composer textarea:disabled{opacity:.6}
.dm-composer button{min-height:auto;padding:.55rem .9rem}

/* A proposal is inert data until a person clicks twice. */
.dm-choices{display:flex;flex-wrap:wrap;gap:.45rem .8rem;margin:.55rem 0 .2rem}
.dm-choice{display:grid;gap:.15rem;font-size:.68rem;color:var(--muted-2);font-weight:700}
.dm-choice select{font:inherit;font-size:.76rem;font-weight:600;color:inherit;background:transparent;border:1px solid rgba(143,131,255,.34);border-radius:8px;padding:.28rem .4rem;min-width:8.5rem}
.dm-assumptions small,.mission-assumptions small{display:block;margin-top:.2rem;color:var(--muted-2);font-weight:500}
.dm-question{margin-top:.6rem;border:1px dashed rgba(143,131,255,.5);border-radius:12px;padding:.55rem .7rem;display:grid;gap:.4rem;justify-items:start}
.dm-question-tag{font-size:.62rem;font-weight:840;letter-spacing:.06em;text-transform:uppercase;color:var(--accent)}
.dm-question p,.dm-missing{margin:0;font-size:.8rem}
.dm-missing{margin-top:.5rem;padding:.5rem .65rem;border-radius:10px;background:rgba(255,184,77,.1)}
.dm-depth-note{margin:.4rem 0 0;padding:.4rem .55rem;border-radius:9px;background:rgba(255,184,77,.1);font-size:.72rem}
.dm-focus{margin:.35rem 0 0;font-size:.74rem;color:var(--muted-2)}
.mission-brief{margin:.6rem 0;padding:.6rem .75rem;border-radius:12px;background:rgba(143,131,255,.06);font-size:.8rem;display:grid;gap:.25rem}
.mission-brief p{margin:0}
.mission-assumptions ul{margin:.2rem 0 0;padding-left:1.1rem}
.mission-needs-detail{margin:.5rem 0 0;padding:.6rem .75rem;border-radius:12px;background:rgba(255,184,77,.1);font-size:.8rem;display:grid;gap:.45rem;justify-items:start}
.mission-needs-detail p{margin:0}
.mission-needs-detail[hidden]{display:none}
.dm-proposal{margin-top:.6rem;border:1px solid rgba(143,131,255,.34);border-radius:12px;background:rgba(143,131,255,.05);padding:.62rem .7rem}
.dm-proposal-tag{font-size:.62rem;font-weight:840;letter-spacing:.06em;text-transform:uppercase;color:var(--accent)}
.dm-proposal-title{display:block;margin:.25rem 0 .4rem;font-size:.85rem}
.dm-proposal-fields{margin:0;display:grid;grid-template-columns:auto minmax(0,1fr);gap:.18rem .55rem;font-size:.76rem}
.dm-proposal-fields dt{color:var(--muted-2);font-weight:700}
.dm-proposal-fields dd{margin:0;color:#dedcd8;overflow-wrap:anywhere}
.dm-proposal-actions{display:flex;flex-wrap:wrap;gap:.4rem;margin-top:.55rem}
.dm-proposal-actions button{min-height:auto;padding:.42rem .7rem;font-size:.76rem}
.dm-confirm{margin-top:.55rem;border-top:1px dashed var(--line);padding-top:.55rem;font-size:.78rem}
.dm-confirm p{margin:0 0 .25rem}
.dm-confirm-objective{color:#dedcd8}
.dm-confirm-cost{color:var(--accent);font-weight:700}

@media(max-width:760px){
  .dm-layout{grid-template-columns:1fr}
  .dm-layout .dm-thread{display:none}
  .dm-layout.is-thread-open .dm-contacts{display:none}
  .dm-layout.is-thread-open .dm-thread{display:flex}
  .dm-layout.is-thread-open .dm-back{display:block}
  .dm-bubble{max-width:92%}
  .dm-messages{max-height:none}
}

/* ---- Brand, icons and agent identity (RC9) ------------------------------ */
:root{
  /* The Laboryn teal, used for identity and for one accent at a time - not as
     a decorative wash. --accent-strong stays the interactive indigo it already
     was, so nothing existing shifts meaning. */
  --brand:#6FD6C4;
  --brand-deep:#174A46;
}
.brand-mark{display:block;color:var(--brand)}
.brand-mark-slot{display:inline-flex;align-items:center;justify-content:center}
.brand-lockup{display:inline-flex;align-items:center;gap:.5rem}
.brand-word{font-weight:760;letter-spacing:-.015em;font-size:1.02rem;color:var(--ink)}

/* One family: the same box, the same optical weight, colour from the parent. */
.icon{display:block;flex:none}
.nav-icon,.settings-icon,.empty-icon{display:inline-flex;align-items:center;justify-content:center;color:inherit}
.empty-icon{color:var(--muted-2)}
.empty-icon .icon{width:22px;height:22px}
.settings-icon{color:var(--accent)}

/* ---- Agent identity ----------------------------------------------------- */
/* The name leads, the canonical role sits under it, and "Agent IA" is never
   more than a glance away. */
.dm-contact-name{font-size:.82rem;font-weight:750;line-height:1.2;color:var(--ink)}
.dm-contact-role{display:flex;align-items:center;gap:.4rem;flex-wrap:wrap;font-size:.72rem;font-weight:600;color:var(--muted)}
.dm-ai-tag{font-size:.58rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--muted-2);border:1px solid var(--line);border-radius:4px;padding:.08rem .26rem;white-space:nowrap}
.dm-thread-role{display:flex;align-items:center;gap:.45rem;flex-wrap:wrap}
.dm-thread-tagline{font-size:.75rem;color:var(--muted);line-height:1.4}
.contact-avatar{background:#17171c;border:1px solid var(--line)}
.contact-avatar .icon{width:18px;height:18px}
.channel-avatar .icon,.dm-thread-head .contact-avatar .icon{width:20px;height:20px}

.agent-card{margin:.7rem .85rem 0;border:1px solid var(--line);border-radius:10px;background:#141417}
.agent-card summary{cursor:pointer;padding:.5rem .7rem;font-size:.74rem;font-weight:700;color:var(--muted);list-style:none}
.agent-card summary::-webkit-details-marker{display:none}
.agent-card summary::after{content:"+";float:right;color:var(--muted-2)}
.agent-card[open] summary{color:var(--ink);border-bottom:1px solid var(--line)}
.agent-card[open] summary::after{content:"–"}
.agent-card-body{padding:.7rem .8rem;display:grid;gap:.7rem}
.agent-card-body h5{margin:0 0 .25rem;font-size:.64rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:var(--muted-2)}
.agent-card-body p{margin:0;font-size:.78rem;line-height:1.5;color:#dcdbd7}
.agent-card-body ul{margin:0;padding-left:1.05rem;display:grid;gap:.18rem;font-size:.78rem;line-height:1.45;color:#dcdbd7}
.agent-card-style{color:var(--muted)}
.agent-card-note{border-top:1px solid var(--line);padding-top:.55rem;font-size:.7rem;color:var(--muted-2)}

/* ---- Transport failure -------------------------------------------------- */
/* A message that never left carries its own state, next to the words it holds. */
.dm-undelivered{opacity:.72;border-style:dashed}
.dm-undelivered-tag{display:block;margin-top:.3rem;font-size:.62rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase;color:var(--warning)}
.dm-failed-actions{display:flex;flex-wrap:wrap;gap:.4rem;align-items:center}
.dm-failed-actions button{min-height:auto;padding:.32rem .6rem;font-size:.74rem}
.dm-dismiss{background:none;border:0;color:var(--muted-2);font:inherit;font-size:.74rem;cursor:pointer;padding:.32rem .3rem}
.dm-dismiss:hover{color:var(--ink)}

/* ---- Visual pass -------------------------------------------------------- */
/* Fewer gradients, fewer haloes, one radius language, borders instead of glow.
   Only surfaces this release owns are touched. */
.team-office{background:var(--surface);box-shadow:none;border-radius:12px}
.team-decision{border-radius:12px}
.dm-thread,.dm-contact,.channel,.agent-card,.team-card{box-shadow:none}
.dm-contact{border-radius:10px}
.dm-bubble{border-radius:12px}
.mission-summary-card{background:#141418;border-radius:12px}
.team-rule{font-weight:600;letter-spacing:0;text-transform:none}
/* Interactive states read as state, not as decoration. */
.dm-contact:focus-visible,.agent-card summary:focus-visible{outline:2px solid var(--accent-strong);outline-offset:2px}
.dm-contact.is-open{border-left-color:var(--brand)}

/* ---- Visual validation pass (RC9-b) ------------------------------------- */
/* Everything below answers one reviewed screenshot. Nothing here changes what
   the interface says - only how much room it takes and how loudly it says it. */

/* 3. Discussions holds the viewport. The header stays put, the history scrolls
   inside itself, and the composer is always reachable: writing a message must
   never require scrolling the whole page to find the field. */
.content:has(#panel-discussions.active){padding-bottom:0}
#panel-discussions.active{display:flex;flex-direction:column;height:calc(100vh - 68px);height:calc(100dvh - 68px);min-height:0}
#panel-discussions .panel-wide{display:flex;flex-direction:column;flex:1;min-height:0;padding-top:1.35rem;padding-bottom:1rem}
#panel-discussions .section-heading{flex:none;margin-bottom:.7rem}
.discussions{flex:1;min-height:0;margin-top:0}
.dm-layout{height:100%;min-height:0;align-items:stretch}
.dm-contacts{min-height:0;overflow-y:auto;padding-right:.15rem}
.dm-thread{height:100%;min-height:0}
.dm-thread-head,.dm-composer,.agent-card,.dm-error{flex:none}
.dm-messages{flex:1;min-height:0;max-height:none}

/* 4. The empty state was mostly emptiness. */
.empty-state{padding:2rem 1rem}
.empty-state p{margin-bottom:0}

/* 5. The sidebar mark reads as an identity, not as an afterthought - one step
   up in size and a little more room around it, still smaller than the nav. */
.brand-row{height:54px;gap:.7rem;padding:.3rem .4rem .3rem .3rem}
.brand-name{font-size:15px;font-weight:780;letter-spacing:-.015em}

/* 6. "Agent IA" was repeated five times in a list nobody had asked a question
   of yet. It now appears where a person actually reads who answers them: the
   conversation header and the professional card. */
.dm-ai-tag{font-size:13px;letter-spacing:.04em;padding:.1rem .34rem;color:var(--muted)}

/* 7. A typographic floor. Metadata never below 13px, content between 14 and
   16px, on every surface this release owns. */
.dm-contact-name{font-size:15px}
.dm-contact-role{font-size:13px;font-weight:600}
.dm-contact-last{font-size:13px}
.dm-activity{font-size:13px}
.dm-thread-role{font-size:16px}
.dm-thread-tagline{font-size:13px}
.dm-thread-state{font-size:13px}
.dm-text{font-size:14px;line-height:1.55}
.dm-stamp{font-size:13px;margin-top:.4rem}
.dm-empty{margin:1.6rem auto;max-width:34ch;font-size:14px}
.dm-failed p{font-size:14px}
.dm-error{font-size:13px}
.dm-undelivered-tag{font-size:13px;letter-spacing:.04em}
.dm-composer textarea{font-size:15px}
.dm-failed-actions button,.dm-dismiss{font-size:14px}
.dm-proposal-tag{font-size:13px;letter-spacing:.04em}
.dm-proposal-title{font-size:15px}
.dm-proposal-fields{font-size:13px}
.agent-card summary{font-size:14px}
.agent-card-body h5{font-size:13px;letter-spacing:.04em}
.agent-card-body p,.agent-card-body ul{font-size:14px}
.agent-card-note{font-size:13px}
.team-office-head h3{font-size:16px}
.team-office-head p,.team-office-mission,.team-rule{font-size:13px}
.team-card-title{font-size:14px}
.team-card-speciality,.team-card-contribution,.team-state{font-size:13px}
.maze-title{font-size:14px}
.maze-detail{font-size:13px}
.attention-card span,.attention-card small{font-size:13px}
.mission-estimate{font-size:13px}

/* 9. One selection colour. The five identity hues had become an outline per
   agent plus a second glow on the open one; an agent is now told apart by its
   icon and its name, and selection is told apart by the brand. */
.dm-contact{border-left:1px solid var(--line)}
.dm-contact.is-open{border-color:var(--brand);border-left-color:var(--brand);
  background:rgba(111,214,196,.07);box-shadow:none}
.contact{border-left:1px solid var(--line)}
.contact.is-open{border-color:var(--brand);background:rgba(111,214,196,.07);box-shadow:none}
.team-card{border-top:1px solid var(--line)}
.maze-node.is-filled{border-color:var(--line);box-shadow:none}
.contact-avatar .icon,.channel-avatar .icon,.team-glyph .icon,.maze-glyph .icon{color:var(--brand)}
.team-glyph,.maze-glyph{display:inline-flex;align-items:center;color:var(--brand)}
.maze-node.is-empty .maze-glyph{color:var(--muted-2)}

/* 10. Home: less of a product tour, more of a workspace. The content starts
   higher, the depth chips stop shouting, and the three account facts below
   carry real weight because they are the only numbers on the screen. */
.home-stage{padding:clamp(1.4rem,4vh,2.6rem) 0 1.6rem}
.home-hero{margin-bottom:1.6rem}
.home-hero h2{font-size:clamp(1.8rem,3.2vw,2.5rem);margin:0 0 .55rem}
.home-hero>p{font-size:15px;margin-bottom:1.2rem}
.mission-mode-chip span{font-size:13px;padding:.36rem .62rem}
.quick-actions{margin-top:.6rem}
.quick-actions button{font-size:13px;padding:.4rem .66rem}
.attention-row{margin:1.5rem 0 0;gap:.6rem}
.attention-card{padding:1rem 1.05rem;gap:.24rem}
.attention-card strong{font-size:16px;letter-spacing:-.015em}

/* ---- Visual validation pass, addendum ---------------------------------- */
/* A soft keyboard shrinks the visual viewport but not 100vh, so on a phone
   the composer would slide under the keyboard. 100dvh follows it; the
   100vh line above stays as the fallback where dvh is unknown. */
@media(max-width:900px){
  #panel-discussions.active{height:calc(100vh - 62px);height:calc(100dvh - 62px)}
}
/* Nothing in this panel may widen the page: long words wrap, and the two
   columns are allowed to shrink below their content. */
.dm-layout,.dm-contacts,.dm-thread,.dm-messages,.dm-thread-head,.dm-composer{max-width:100%}
.dm-contact,.dm-contact-body{min-width:0}
.dm-contact-name,.dm-contact-role{overflow-wrap:anywhere}
/* Descriptions in the team panel: a little more air, nothing rebuilt. */
.team-card-speciality{line-height:1.5}
.team-card-title{line-height:1.3}
.maze-detail{line-height:1.45}

/* ---- Laboryn Office (RC10) ---------------------------------------------- */
/* The room is an illustration served as an image; the Circuit, the five seats
   and the conversation panel are layered over it. Nothing here is decorative
   state: a colour on this page always stands for something the data says. */

.dm-modes{display:inline-flex;gap:.2rem;padding:.2rem;margin:0 0 .6rem;border:1px solid var(--line);border-radius:999px;background:#141416}
.dm-mode{min-height:auto;border:0;background:transparent;color:var(--muted);font:inherit;font-size:13px;font-weight:700;padding:.34rem .9rem;border-radius:999px;cursor:pointer}
.dm-mode:hover{color:var(--ink)}
.dm-mode.is-active{background:rgba(111,214,196,.12);color:var(--brand)}
.dm-mode:focus-visible{outline:2px solid var(--accent-strong);outline-offset:2px}

/* With nothing selected the room takes the width it needs. With a seat open the
   panel slides in beside it and the room stays on screen, narrower. */
.office-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:.8rem;height:100%;min-height:0}
.office-layout.is-agent-open{grid-template-columns:minmax(0,1fr) minmax(380px,.72fr)}
.office-stage-wrap{display:flex;flex-direction:column;min-height:0;min-width:0;overflow-y:auto;gap:.55rem}
.office-stage{position:relative;width:100%;flex:none;border-radius:16px;overflow:hidden;
  border:1px solid var(--line);background:#0b0b0f}
.office-scene{display:block;width:100%;height:auto;max-width:100%}
.office-circuit-layer{position:absolute;inset:0;width:100%;height:100%;max-width:100%;pointer-events:none}

/* The Circuit is engraved, not animated. Permanent access is a thin dashed
   trace from the hub; the collective circuit is a solid arc with a direction.
   Neither carries a transition or an animation, because neither reports an
   event. */
.office-link{fill:none}
.office-link-permanent{stroke:#7f8f92;stroke-width:1.1;stroke-dasharray:3 5;opacity:.5}
.office-link-circuit{stroke:var(--brand);stroke-width:1.7;opacity:.4}
.office-trace-head{fill:var(--brand);opacity:.55}
.office-node{fill:var(--brand);opacity:.5}
.office-hub ellipse{fill:#10161a;stroke:var(--brand);stroke-width:1.1;opacity:.9}
.office-hub text{fill:var(--ink);font:700 15px/1 Inter,system-ui,sans-serif;letter-spacing:.01em}

/* The seats: real buttons covering each workstation, with a small plate under
   the desk. The percentages mirror OFFICE_SEATS in app.js - a test compares the
   two - and they are here rather than inline because the application's CSP
   forbids inline style attributes. */
.office-seats{position:absolute;inset:0;pointer-events:none}
.office-seat{position:absolute;width:17.5%;height:29.5%;transform:translateX(-50%);
  display:flex;align-items:flex-end;justify-content:center;pointer-events:auto;
  background:transparent;border:1px solid transparent;border-radius:14px;padding:0;
  color:inherit;font:inherit;cursor:pointer;min-height:auto}
.office-seat-director{left:50%;top:11.5%}
.office-seat-verifier{left:25%;top:26.15%}
.office-seat-researcher{left:75%;top:26.15%}
.office-seat-critic{left:32.67%;top:59.23%}
.office-seat-strategist{left:67.33%;top:59.23%}
.office-seat:hover{background:rgba(111,214,196,.05);border-color:rgba(111,214,196,.28)}
.office-seat:focus-visible{outline:2px solid var(--accent-strong);outline-offset:2px}
.office-seat.is-open{background:rgba(111,214,196,.08);border-color:var(--brand)}

.office-plate{display:grid;gap:.1rem;width:100%;max-width:210px;
  border:1px solid var(--line);border-radius:9px;background:rgba(17,17,21,.92);
  padding:.3rem .45rem;backdrop-filter:blur(2px)}
.office-seat.is-open .office-plate{border-color:var(--brand)}
.office-plate-row{display:flex;align-items:flex-start;gap:.35rem;min-width:0}
.office-seat-icon{display:inline-flex;color:var(--brand);flex:none;margin-top:1px}
.office-seat-role{font-size:13px;font-weight:720;color:var(--ink);line-height:1.25;
  min-width:0;text-align:left}
.office-dot{flex:none;width:7px;height:7px;border-radius:50%;background:currentColor;margin-top:4px}
/* The words only when they are wanted: on hover, on focus, or once selected.
   Two `display` values in one block is how the state ended up permanently
   visible, so the hidden and shown states are separate rules. */
.office-seat .office-seat-state{display:none}
.office-seat:hover .office-seat-state,
.office-seat:focus-visible .office-seat-state,
.office-seat.is-open .office-seat-state{display:-webkit-box;-webkit-line-clamp:2;
  -webkit-box-orient:vertical;overflow:hidden;font-size:13px;line-height:1.25;text-align:left}

/* The five real states. Colour stands for the state and for nothing else. */
.office-state-available{color:var(--muted)}
.office-state-replying{color:var(--accent)}
.office-state-onmission{color:var(--brand)}
.office-state-awaiting{color:var(--warning)}
.office-state-interrupted{color:var(--danger)}

.office-hint{margin:0;font-size:14px;color:var(--muted);flex:none}

/* The written circuit stays available, but it no longer stands in for the
   drawing: the table carries it. */
.office-circuit{border:1px solid var(--line);border-radius:10px;background:#131316;flex:none}
.office-circuit summary{cursor:pointer;padding:.5rem .7rem;font-size:13px;font-weight:700;color:var(--muted);list-style:none}
.office-circuit summary::-webkit-details-marker{display:none}
.office-circuit summary::after{content:"+";float:right;color:var(--muted-2)}
.office-circuit[open] summary{color:var(--ink);border-bottom:1px solid var(--line)}
.office-circuit[open] summary::after{content:"–"}
.office-circuit summary:focus-visible{outline:2px solid var(--accent-strong);outline-offset:2px}
.office-circuit-body{padding:.7rem .8rem;display:grid;gap:.5rem}
.office-circuit-body p{margin:0;font-size:14px;line-height:1.5;color:#dcdbd7}
.office-circuit-note{color:var(--muted)}
.office-circuit-list{margin:0;padding-left:1.2rem;display:grid;gap:.2rem;font-size:13px;color:var(--muted)}

/* The conversation panel, reusing the messaging surface unchanged. */
.office-panel{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:14px;
  background:#131316;min-width:0;min-height:0;max-width:100%;animation:office-slide-in .18s ease-out}
.office-panel-head{display:grid;grid-template-columns:auto minmax(0,1fr);gap:.6rem;align-items:center;
  padding:.75rem .85rem;border-bottom:1px solid var(--line);flex:none}
.office-back{display:block;grid-column:1/-1;justify-self:start;background:none;
  border:1px solid var(--line);border-radius:999px;color:var(--muted);font:inherit;font-size:13px;
  padding:.3rem .7rem;margin-bottom:.45rem;cursor:pointer;min-height:auto}
.office-back:hover{color:var(--ink);border-color:#3a3a3e}
.office-back:focus-visible{outline:2px solid var(--accent-strong);outline-offset:2px}
.office-panel .dm-messages{flex:1;min-height:0;max-height:none}
.office-panel .dm-composer,.office-panel .agent-card,.office-panel .dm-error{flex:none}
@keyframes office-slide-in{from{opacity:0;transform:translateX(14px)}to{opacity:1;transform:none}}

/* The compact Office: below 620px the room is kept as a thumbnail and the same
   five seats become a list. Same mode, same states, same click target. */
/* The room, kept as a picture where it cannot be a workspace. */
.office-thumb{display:none;width:100%;max-width:100%;height:auto;border:1px solid var(--line);border-radius:12px;background:#0b0b0f}
.office-compact{display:none;margin:0;padding:0;list-style:none;gap:.34rem;grid-template-columns:1fr}
.office-compact-seat{display:grid;grid-template-columns:1.8rem minmax(0,1fr);gap:.55rem;align-items:center;
  width:100%;text-align:left;background:var(--surface);border:1px solid var(--line);border-radius:10px;
  padding:.6rem .65rem;color:inherit;font:inherit;cursor:pointer;min-height:auto}
.office-compact-seat:hover{background:#17171a}
.office-compact-seat:focus-visible{outline:2px solid var(--accent-strong);outline-offset:2px}
.office-compact-seat.is-open{border-color:var(--brand);background:rgba(111,214,196,.07)}
.office-compact .office-seat-copy{display:grid;gap:.12rem;min-width:0}
.office-compact .office-seat-state{font-size:13px;line-height:1.25}

@media(max-width:1180px){
  .office-layout.is-agent-open{grid-template-columns:minmax(0,1fr) minmax(340px,.9fr)}
  .office-plate{max-width:150px;padding:.26rem .38rem}
  .office-seat-role{font-size:13px}
}
@media(max-width:900px){
  /* The room cannot usefully share the width with a panel here, so the panel
     takes the space and the room waits behind the back button. */
  .office-layout.is-agent-open{grid-template-columns:1fr}
  .office-layout.is-agent-open .office-stage-wrap{display:none}
}
@media(max-width:620px){
  .office-stage{display:none}
  .office-compact{display:grid}
  .office-thumb{display:block}
  .office-panel{border:0;border-radius:0}
}

/* One uniform, very slow breath across the whole room. It is ambient: it says
   the scene is lit, not that anyone is working. Identical everywhere, so it can
   never be read as one agent doing something. */
@media(prefers-reduced-motion:no-preference){
  .office-scene{animation:office-breath 9s ease-in-out infinite}
}
@media(prefers-reduced-motion:reduce){
  .office-panel{animation:none}
}
@keyframes office-breath{0%,100%{opacity:.95}50%{opacity:1}}

/* The panel is a column: the mode switch is fixed, the view below it takes
   the remaining height, so neither mode can push the composer off-screen. */
.discussions{display:flex;flex-direction:column}
.dm-modes{flex:none}
.dm-layout,.office-layout{flex:1;min-height:0}

/* V5 - the team on Home and the dated course of a mission */
.home-team{margin:1.5rem 0 0}.home-team-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:.6rem}
.home-team-card{display:grid;gap:.35rem;align-content:start;border:1px solid var(--line-soft);background:#141415;border-radius:14px;padding:.9rem 1rem}
.home-team-card h4{margin:0;font-size:.98rem;letter-spacing:-.02em}.home-team-card p{margin:0;color:var(--muted);font-size:.82rem;line-height:1.4}
.home-team-card button{justify-self:start;margin-top:.3rem;font-size:.8rem}
.agent-ia-badge{justify-self:start;font-size:.64rem;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);border:1px solid var(--line-soft);border-radius:999px;padding:.08rem .5rem}
.mission-timeline{margin:.9rem 0;border:1px solid var(--line-soft);background:#141415;border-radius:14px;padding:.8rem 1rem}
.mission-timeline h4{margin:0 0 .5rem;font-size:.84rem}.mission-timeline ol{list-style:none;margin:0;padding:0;display:grid;gap:.35rem}
.mission-timeline li{display:grid;grid-template-columns:5.2rem 1fr;gap:.6rem;font-size:.8rem;line-height:1.35}
.mission-timeline time{color:var(--muted);font-variant-numeric:tabular-nums}.mission-timeline .tl-active span{color:var(--ink);font-weight:600}.mission-timeline .tl-warn span{color:#e7b24f}

/* V5 responsive: a conversation follows its own pane, not only the viewport. */
.discussions{container:discussions / inline-size;min-width:0;width:100%}
.mission-detail{container:mission / inline-size;min-width:0}
.mission-detail-head{flex-wrap:wrap}
.mission-detail-head>div,.team-office-head>div,.mission-timeline li>span,.home-team-card{min-width:0;overflow-wrap:anywhere}
.team-office-mission,.team-card-contribution,.channel-objective{overflow-wrap:anywhere}
.dm-thread-head,.office-panel-head{overflow-wrap:anywhere}
.agent-card[open]{max-height:30%;overflow-y:auto;overscroll-behavior:contain}

@container discussions (max-width:760px){
  .dm-layout{grid-template-columns:1fr}
  .dm-layout .dm-thread{display:none}
  .dm-layout.is-thread-open .dm-contacts{display:none}
  .dm-layout.is-thread-open .dm-thread{display:flex}
  .dm-layout.is-thread-open .dm-back{display:block}
  .dm-bubble{max-width:92%}
}
@container discussions (max-width:900px){
  .office-layout.is-agent-open{grid-template-columns:1fr}
  .office-layout.is-agent-open .office-stage-wrap{display:none}
}
@container mission (max-width:720px){
  .team-channels{grid-template-columns:1fr}
  .team-channels .channel-pane{display:none}
  .team-channels.is-channel-open .contact-list{display:none}
  .team-channels.is-channel-open .channel-pane{display:block}
  .team-channels.is-channel-open .channel-back{display:block}
}
@media(max-width:600px),(max-height:650px){
  #panel-discussions .panel-wide{padding-top:.65rem;padding-bottom:.6rem}
  #panel-discussions .section-heading{margin-bottom:.4rem}
  #panel-discussions .section-heading h2{font-size:1.4rem}
  #panel-discussions .section-heading p{font-size:13px;margin-bottom:.4rem}
  .dm-thread-head,.office-panel-head{padding:.55rem .65rem;gap:.35rem .5rem}
  .dm-thread-role{font-size:14px;gap:.25rem}
  .dm-thread-tagline{display:none}
  .dm-back,.office-back{margin-bottom:0}
  .agent-card{margin:.3rem .6rem}
  .dm-messages{padding:.6rem}
}
@media(max-height:650px){
  #panel-discussions .section-heading p{display:none}
}
/* In landscape or a keyboard-sized viewport, let the page scroll rather than
   flattening the history or trapping the composer below a clipped panel. */
@media(max-height:480px){
  #panel-discussions.active{height:auto;min-height:calc(100dvh - 62px)}
  #panel-discussions .discussions{height:440px;flex:none}
}
